CNI defines how Linux and Windows containers attach to networks via plugins. The project ships the specification, Go integration libraries, and tooling to run plugins when containers start or stop.
Overview
The Container Network Interface (CNI) is a CNCF project that standardizes how runtimes configure container networking. Plugins add or remove interfaces and manage IP addressing when containers are created or deleted.
The focus stays on connectivity and cleanup rather than full application networking. A simple API and wide runtime support make it a common integration point for Kubernetes, Docker, and other orchestrators.
The CNI project publishes the specification, a Go library for embedding CNI in applications, and an example CLI for invoking plugins. Maintainers publish reference plugins in a separate repository with binaries and checksums.
Documentation covers writing new plugins, running sample setups with bundled scripts, and future directions such as dynamic updates and bandwidth policies.
Key features
- CNI specification
- Go integration library
- Plugin execution CLI
- Linux and Windows containers
- Reference plugin ecosystem
- Net configuration via /etc/cni/net.d
Use cases
- Kubernetes pod networking
- Custom container network plugins
- Embedding CNI in runtimes
- Multi-plugin network chains