Skip to main content
⎈K8sCalc
kubernetes

What is CNI (Container Network Interface)?

A standard interface for Kubernetes networking plugins. CNI plugins (Flannel, Calico, Cilium) handle pod-to-pod networking, IP address management, and network policies.

CNI (Container Network Interface) explained

How it works. When a Pod starts, the kubelet asks the container runtime to create its network namespace, and the runtime calls the configured CNI plugin to attach an interface, assign an IP and set up routes. The plugin decides how Pods on different nodes reach each other (overlay such as VXLAN, or native routing/BGP) and whether NetworkPolicies are enforced.

In practice.

  • ›Flannel: simple overlay, no NetworkPolicy enforcement on its own.
  • ›Calico: routing with BGP or overlays, mature NetworkPolicy support.
  • ›Cilium: eBPF datapath, L3–L7 policies, Hubble observability, optional kube-proxy replacement.

Common pitfalls. Pod CIDRs that overlap with your VPC or office network; MTU mismatches with overlays (fragmentation, mysterious timeouts); assuming NetworkPolicies work on a CNI that doesn't enforce them.

Related tool

K8s Cluster Cost

Calculate the monthly cost of running a self-managed Kubernetes cluster on Hetzner Cloud, Vultr, or DigitalOcean. Choose server types for control planes, workers, and load balancers with HA mode.

Related Calculators

Related Generators

Related Comparisons