Overview
CNI provides a standardized way for container orchestrators (like Kubernetes) to interact with different networking solutions. When a pod is created, the orchestrator calls the CNI plugin to set up the network interface and assign an IP address.
How it Works
- The orchestrator creates a network namespace for the container.
- It calls the CNI plugin with the 'ADD' command.
- The plugin configures the interface (e.g., creating a veth pair) and assigns an IP.
- When the container is deleted, the orchestrator calls the plugin with the 'DEL' command to clean up.
Popular CNI Plugins
- Calico
- Flannel
- Cilium
- Weave Net