Why cannot two pods running in different nodes in a k8s cluster have same ip adress? Inside node the network is private, right?
Hi @Pratik-Gawade,
In a Kubernetes (k8s) cluster, each node is responsible for hosting and managing one or more pods. Each pod is assigned a unique IP address within the cluster, and this IP address is used for communication between pods and services. The reason two pods running on different nodes cannot have the same IP address is rooted in the networking principles of Kubernetes :
- Highly coupled container-to-container communications
- Pod-to-Pod communications
- Pod-to-Service communications
- External-to-Service communications
You can read more on the networking principles here
Regard