Understanding networking in Kubernetes
Kubernetes is designed to be extensible, and as such it supports multiple network implementations, all of which meet a clearly defined networking model. K8s has some basic networking rules that all network plugins must follow:
- Every Pod gets its own IP address
- Containers within a Pod share the Pod IP address
- Pods can communicate with all other Pods in the cluster using Pod IP addresses (without NAT)
- Isolation of Pods at the network level is performed using network policies
For compliance reasons, any K8s network implementation must be built to support the Container Network Interface (CNI) specification, which is a Cloud Native Computing Foundation (CNCF) project. The CNI specification consists of guides and libraries for writing plugins to configure network interfaces in containers. While it is possible to have multiple CNIs in a single cluster, by default, a single K8s cluster will be configured to support only a single...