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

  1. The orchestrator creates a network namespace for the container.
  2. It calls the CNI plugin with the 'ADD' command.
  3. The plugin configures the interface (e.g., creating a veth pair) and assigns an IP.
  4. 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

Related Terms