Andrew Mercer
on this page
  • https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/

What a CNI plugin does

Kubernetes doesn't ship pod networking itself. It defines a network model (every pod gets its own IP, and pods can reach each other across nodes without NAT), and a CNI plugin implements it. Without one, kubeadm init finishes but nodes stay NotReady and CoreDNS pods stay Pending.

From the upstream docs:

You must use a CNI plugin that is compatible with the v0.4.0 or later releases of the CNI specification. The Kubernetes project recommends using a plugin that is compatible with the v1.0.0 CNI specification.

Pick the pod CIDR first

The --pod-network-cidr passed to kubeadm init must match the pod CIDR the CNI plugin is configured with, and it must not overlap your LAN or the service CIDR (default 10.96.0.0/12). Calico's example manifests default to 192.168.0.0/16, which collides with most home networks. These docs use 10.244.0.0/16 and set Calico to match.

Plugins

Plugin Notes
Calico Installed via the Tigera operator. IPIP/VXLAN overlay or BGP, with NetworkPolicy support. Needs some care alongside MetalLB.
Cilium eBPF-based. Installed with the cilium CLI. Can replace kube-proxy, and includes Hubble for flow visibility.

Check the plugin is working

kubectl get nodes                       # all nodes Ready
kubectl get pods -n kube-system -l k8s-app=kube-dns   # CoreDNS Running
ls /etc/cni/net.d/                      # the plugin's CNI config on each node
in this section
* calico
* cilium