Overview

In Kubernetes, the CNI is seamlessly integrated with kubelet to allow configurable networks between Pods. The network could be overlay or underlay. The overlay network encapsulates the network traffic using a virtual interface like VxLan, while the underlay network works at the physical layer composed of switches and routers. This decoupling gives us more freedom to choose appropriate network solutions and keeps the Pods portable to heterogeneous infrastructures.

No matter what the underlying infrastructure or network is, the Pods are accessible and can communicate with each other. Before we dive into how the CNI works, it’s worth discussing the Kubernetes networking model. This model is not only a design philosophy, but also has a close relationship with the CNI.

Get hands-on with 1400+ tech skills courses.