如果 POD 具有唯一的 IP 地址,那么 POD 中每个容器的 IP 地址是多少?
If POD has unique IP address, what will be the IP address of each container in POD?
假设我在 POD 中有 2 个容器。
每个 POD 都会有一个唯一的 IP 地址吗?
如果是这样,每个容器的 IP 地址是多少?
pod 中的所有容器共享相同的 IP 地址和本地主机。您必须为每个容器定义不同的端口号。
pod 的网络命名空间 (IP) 由 infra 容器 管理,它只是一个占位符。 pod 中的所有其他容器都共享此 IP 地址(Pod IP),而不是使用主机网络名称空间或主机 IP。
下面的参数控制
--pod-infra-container-image
:每个 pod 中的 network/ipc 个名称空间容器将使用的图像。 (默认 "k8s.gcr.io/pause:3.1")
下面的文章更详细地描述了它。
In Kubernetes, the pause container serves as the "parent container" for all of the containers in your pod. The pause container has two core responsibilities. First, it serves as the basis of Linux namespace sharing in the pod. And second, with PID (process ID) namespace sharing enabled, it serves as PID 1 for each pod and reaps zombie processes.
almighty-pause-container
假设我在 POD 中有 2 个容器。 每个 POD 都会有一个唯一的 IP 地址吗? 如果是这样,每个容器的 IP 地址是多少?
pod 中的所有容器共享相同的 IP 地址和本地主机。您必须为每个容器定义不同的端口号。
pod 的网络命名空间 (IP) 由 infra 容器 管理,它只是一个占位符。 pod 中的所有其他容器都共享此 IP 地址(Pod IP),而不是使用主机网络名称空间或主机 IP。
下面的参数控制--pod-infra-container-image
:每个 pod 中的 network/ipc 个名称空间容器将使用的图像。 (默认 "k8s.gcr.io/pause:3.1")
下面的文章更详细地描述了它。
In Kubernetes, the pause container serves as the "parent container" for all of the containers in your pod. The pause container has two core responsibilities. First, it serves as the basis of Linux namespace sharing in the pod. And second, with PID (process ID) namespace sharing enabled, it serves as PID 1 for each pod and reaps zombie processes. almighty-pause-container