CNI Container Network Interface

CNI Container Network Interface

www.cni.dev

2

About this website

CNI (Container Network Interface) is a Cloud Native Computing Foundation (CNCF) project that defines a standard interface and plugin specification for configuring network interfaces in Linux containers. Originally developed by CoreOS (later acquired by Red Hat in 2018, now part of IBM) for the rkt container runtime in 2014, CNI was adopted by Kubernetes as its primary networking standard and has become the de facto container networking standard used by Kubernetes, Mesos, Mesosphere, and other container orchestration platforms. Key features: specification: CNI defines a simple specification (currently v1.1.0) consisting of a binary plugin protocol and a JSON-based network configuration format. CNI plugins are standalone executables (not libraries) that receive a container ID, network namespace path, and JSON configuration via environment variables and stdin, then configure the network interface and return the result as JSON on stdout. Plugin lifecycle: ADD operation (attach container to network), DEL operation (remove container from network), CHECK operation (verify configuration), VERSION operation (report supported specification versions), and STATUS operation (query network health). Plugin types: main plugins (bridge, ipvlan, loopback, macvlan, ptp/point-to-point, host-device, vlan), IPAM plugins (IP Address Management: dhcp, host-local, static), meta plugins (tuning, portmap, bandwidth, firewall, sbr/source-based-routing, vrf), and Windows plugins. Chained plugins: multiple plugins can be executed in sequence (delegates) to compose complex networking setups. Runtime integration: CNI is integrated into Kubernetes kubelet, which calls CNI plugins when pods are created or deleted. Container runtimes (containerd, CRI-O) delegate networking to CNI. Widely implemented by cloud providers (AWS VPC CNI, Azure CNI, GCP CNI, Calico, Cilium, Flannel, Weave Net). Specification governed by CNCF. BSD-3-Clause.

Tags & Categories

Statistics

2
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!