<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>网络模型 - 标签 - 研发日志 · R&amp;D Log</title><link>https://rd163.visword.com/tags/%E7%BD%91%E7%BB%9C%E6%A8%A1%E5%9E%8B/</link><description>网络模型 - 标签 - 研发日志 · R&amp;D Log</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><managingEditor>whutluohui@gmail.com (小智晖)</managingEditor><webMaster>whutluohui@gmail.com (小智晖)</webMaster><copyright>本作品采用知识共享署名-非商业性使用 4.0 国际许可协议进行许可。</copyright><lastBuildDate>Sun, 12 Jan 2025 00:00:00 +0800</lastBuildDate><atom:link href="https://rd163.visword.com/tags/%E7%BD%91%E7%BB%9C%E6%A8%A1%E5%9E%8B/" rel="self" type="application/rss+xml"/><item><title>kubernetes 网络模型</title><link>https://rd163.visword.com/posts/k8s-networking-model/</link><pubDate>Sun, 12 Jan 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/k8s-networking-model/</guid><description><![CDATA[<h2 id="k8s通信原理" class="headerLink">
    <a href="#k8s%e9%80%9a%e4%bf%a1%e5%8e%9f%e7%90%86" class="header-mark"></a>K8s通信原理</h2><p>这是一张由外向内的典型的容器网络架构图。</p>
<p><img class="tw:inline" loading="lazy" src='https://wmxiaozhi.github.io/picx-images-hosting/picx-imgs/k8s-net/k8s-network-arch.png'     ></p>
<p>为了能够正常通信，图中每个参与通信的实体都需要有一个 IP 地址，由集群外部到集群内部：</p>
<table>
	<thead>
			<tr>
					<th>IP类型</th>
					<th>说明</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Proxy-IP</td>
					<td>代理层公网地址IP，外部访问应用的网关服务器。[实际需要关注的IP]</td>
			</tr>
			<tr>
					<td>Service-IP</td>
					<td>Service的固定虚拟IP，Service-IP是内部，外部无法寻址到。</td>
			</tr>
			<tr>
					<td>Node-IP</td>
					<td>容器宿主机的主机IP。</td>
			</tr>
			<tr>
					<td>Container-Bridge-IP</td>
					<td>容器网桥（docker0）IP，容器的网络都需要通过容器网桥转发。</td>
			</tr>
			<tr>
					<td>Pod-IP</td>
					<td>Pod的IP，等效于Pod中网络容器的Container-IP。</td>
			</tr>
			<tr>
					<td>Container-IP</td>
					<td>容器的IP，容器的网络是个隔离的网络空间。</td>
			</tr>
	</tbody>
</table>
<h3 id="容器间通信" class="headerLink">
    <a href="#%e5%ae%b9%e5%99%a8%e9%97%b4%e9%80%9a%e4%bf%a1" class="header-mark"></a>容器间通信</h3><p>先来看最简单的情况， 即同一个Pod内部容器之间的通信：</p>]]></description></item></channel></rss>