Posts

Showing posts with the label cni

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 ...

KB: Kube-proxy vs CNI Plugin

  kube-proxy is not considered a CNI plugin in Kubernetes or AKS (Azure Kubernetes Service). It serves a different purpose within the Kubernetes networking stack. Let me clarify the roles of kube-proxy and a CNI plugin kube-proxy: Role : kube-proxy manages network rules that allow communication between Kubernetes services and pods. It sets up the networking rules (e.g., iptables, IPVS, or eBPF) to enable service discovery and routing within the cluster. Key Responsibilities : Implements Kubernetes Service networking. Forwards traffic from a service's ClusterIP to the appropriate pod(s) backing the service. Handles load balancing for traffic directed to services. Scope : It operates at the service level, not the pod-to-pod network level. CNI Plugin: Role : A CNI plugin is responsible for setting up the pod network. It ensures that all pods across the cluster can communicate with each other and with the host network. Key Responsibilities : Assigns IP addresses to pods. Configures ...