CNI
- The simplest possible interface between container runtime and network implementation
- Originated at CoreOS as part of Rkt
- Now a CNCF project
- CNI is a simple interface based on environment variables and JSON
- Open Source, lots of runtimes and plugins use it
What does a CNI call look like?
Network plugin calls IPAM plugin
CNI project repo
https://github.com/containernetworking/cni
CNI Specification: the API between runtimes and network plugins
Conventions: extensions to the API that are not required for all plugins
Library: a Go implementation of the CNI specification that plugins and runtimes can use
5 maintainers
63 contributors from 10+ companies
785 stars
CNI plugins repo
https://github.com/containernetworking/plugins
Main: interface-creating
• bridge • ipvlan • loopback • macvlan • ptp • vlan
IPAM: IP address allocation
• dhcp • host-local
Meta: other plugins
• flannel • tuning • portmap
Sample
• The sample plugin provides an example for building your own plugin.
Ecosystem
Container runtimes
- rkt - container engin
- Kubernetes
- Kurma - container runtime
- Cloud Foundry - a platform for cloud applications
- Mesos - a distributed systems kernel
3rd party plugins
- Weave Net
- Project Calico
- Contiv
- SR-IOV
- Cilium
- Infoblox
- Multus
- Romana
- CNI-Genie