Posts

Showing posts from January, 2025

KB: Kubernetes finding Networking (or CNI Plugin)

By default the kubelet looks into /etc/cni/net.d to discover the CNI plugins. This will be the same on every controlplane and worker nodes. Default Behavior of kubelet and CNI Plugins: Location of CNI Configuration: By default, the kubelet looks in /etc/cni/net.d for the CNI configuration files. This is where the CNI plugin's configuration files (like 10-weave.conf , 10-calico.conf , etc.) are stored. If this directory contains valid configuration files, the kubelet uses the plugin(s) specified there. Location of CNI Plugin Executables: The actual CNI binaries (executables) are typically stored in /opt/cni/bin by default. These binaries implement the networking logic (e.g., Calico, Weave Net, Flannel). Consistency Across Nodes: The /etc/cni/net.d directory must have consistent CNI configurations across all control plane and worker nodes . This ensures that all nodes in the cluster handle pod networking in a consistent manner. Similarly, the required binaries (in /opt/cni/bin ...