Member-only story
Unlocking Modern Infrastructure
Mastering Kubernetes: Unleashing Cloud-Native Potential
Part 2: Kubernetes Networking Explained
To get a fully functional Kubernetes cluster up and running the network needs to be properly set up. With K8s the only caveat is that the smallest compute unit is not a container but a Pod.
A Pod is a group of collocated containers that share the same IP address. From the networking perspective, a pod is seen as a virtual machine of physical hosts. The network needs to assign IP addresses to pods, and needs to provide traffic routes between all pods on any nodes.
There are three main networking challenges to solve in a container orchestration system:
- Coupled container-to-container communications (solved by the Pod concept)
- Pod-to-Pod communication (covered in detail in Cluster Networking)
- Pod-to-Service communication (covered in detail in Services)
- External-to-Service communication (covered in detail in Services)
Kubernetes expects the Pod-to-Pod communication to be available. It will not do it for us.
Pods are assigned an IP address prior to application containers being started. The Service object is used…