Kubernetes VIP address clarifications

6.6k Views Asked by At

I'm a bit confused by some of the Kubernetes documentation on virtual IPs: 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.

The Kubernetes master assigns that VIP address to what? Where is the VIP address assigned?

How does the virtual IPs of a service integrate with an external ip address?

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

Does this mean that when running kubectl get services I could see services having the same port?

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

Who are the clients? Other services within the cluster or some joe smo who's just using your app and knows nothing about kubernetes.

1

There are 1 best solutions below

2
On BEST ANSWER

The virtual in VIP means that the IP is not attached to a network interface, technical (in the current default config with kube-proxy) this means it's an IPtables entry, purely used to provide a stable communication endpoint. I've written about it in greater detail in the blog post Kubernetes Services By Example, if you want to see how it works in a concrete setup.

Note that every node in the cluster has all the pod and service-related IPtables entries and this can lead to scalability and performance issues.