Kubernetes VIP 地址说明

Kubernetes VIP address clarifications

我对一些关于虚拟 IP 的 Kubernetes 文档感到有点困惑:https://kubernetes.io/docs/concepts/services-networking/service/#the-gory-details-of-virtual-ips

Userspace As an example, consider the image processing application described above. > When the backend Service is created, the Kubernetes master assigns a virtual IP address, for example 10.0.0.1.

Kubernetes master 将该 VIP 地址分配给什么? VIP地址分配在哪里?

服务的虚拟 IP 如何与外部 IP 地址集成?

In order to allow users to choose a port number for their Services, we must ensure that no two Services can collide

这是否意味着当 运行 kubectl get services 我可以看到具有相同端口的服务?

When clients connect to the VIP, their traffic is automatically transported to an appropriate endpoint

客户是谁?集群中的其他服务或一些 joe smo 只是在使用您的应用程序并且对 kubernetes 一无所知。

VIP 中的 virtual 意味着 IP 没有附加到网络接口,技术(在当前默认配置中 kube-proxy)这意味着它是一个 IPtables 条目,纯粹用于提供稳定的通信端点.如果您想了解它在具体设置中的工作原理,我已经在博客 post Kubernetes Services By Example 中详细介绍了它。

请注意,集群中的每个节点都有所有 pod 和与服务相关的 IPtables 条目,这可能导致 scalability and performance issues