gpt4 book ai didi

kubernetes - 在kubernetes中,POD将具有IP地址,而Node将具有IP地址

转载 作者:行者123 更新时间:2023-12-02 11:48:21 26 4
gpt4 key购买 nike

在kubernetes中,POD将具有IP地址,而Node将具有IP地址。

我知道我们使用POD IP地址通过容器端口访问其中的容器。我们是否出于任何目的使用节点IP?
Will kubernetes还将负责为Pod创建IP地址。

最佳答案

Kubernetes网络插件创建一个单独的Pod网络(印花布,法兰绒,波浪纹等)

从该Pod网络为Pod分配IP

由于网络 namespace 是共享的,因此pod中的所有容器都具有相同的IP地址

NodeIP可用于从外部系统访问Pod上运行的服务,例如,如果您使用类型为Nodeport的kubernetes Service公开该服务,或使用入口资源公开该服务

更多:

Every Pod is allocated an IP address, and the CNI plug-in is responsible for its allocation and assignment to a Pod. You may be asking yourself, “If a Pod can have multiple containers, how does the CNI know which one to connect?” If you have ever interrogated Docker to list the containers running on a given Kubernetes node, you may have noticed a number of pause con‐ tainers associated with each of your Pods. These pause containers do nothing meaningful computationally. They merely serve as pla‐ ceholders for each Pod’s container network. As such, they are the first container to be launched and the last to die in the life cycle of an individual Pod

关于kubernetes - 在kubernetes中,POD将具有IP地址,而Node将具有IP地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52991306/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com