What is CNI?
CNI (Container Network Interface) is specification for writing plugins to configure network interfaces for Linux containers, along with a number of supported plugins. CNI concerns itself only with network connectivity of containers and removing allocated resources when the container is deleted. Because of this focus, CNI has a wide range of support and the specification is simple to implement.
For more information on CNI refer to the CNI Github page
A variety of CNI plugins are available to enable Kubernetes to integrate with specific networking solutions.
Following table compares the various CNI plugins across different networking features. (NOTE: Managed Kubernetes only supports a subset of these plugins, as mentioned below.)
|Networking plugin||Forwards to bridge driver||Yes||Yes (via bridge plugin)||Yes (bridge driver)||Yes|
|IPAM||host-local||calico-ipam||weave ipam / host-local||host-local||contiv ipam|
|Host to host networking||Overlay - UDP and VXLAN||BGP L3 routing based||Fast data path and weave router sleeve (VXLAN)||Calico + Flannel||Overlay - VXLAN and VLAN based networks using a vSwitch|
|Kubernetes network policy support||No||Yes||Yes||Yes||Yes|
|Scalability||Limited||L3 IP. Scalable||Scalable. Fast data path makes it more efficient||Scalable with advantage of easy setup that flannel brings||Integrates with ACI fabric. Highly scalable with ACI|
|Debugability||Easy with UDP||Easy since it uses IP||Weave CLI has multiple debugging commands||Mix of Calico + Flannel||Community and documentation|
Plugins Supported By Managed Kubernetes
Platform9 Managed Kubernetes supports following CNI plugins today:
Flannel is a very simple overlay network that provides an easy way to configure a layer 3 network fabric designed for Kubernetes. See Integration with Flannel for more information on Flannel integration with Mananged Kubernetes.
Calico is a popular Layer 3 based networking solution that is used to interconnect virtual machines or Linux containers with the help of virtual routers. See Integration with Calico for more information on Calico integration with Mananged Kubernetes.
Calico with Flannel Networking
It is possible to deploy Calico networking plugin for your Kubernetes cluster in such a way that the cluster uses Calico for network policy and flannel overlay with VXLAN for networking. Managed Kubernetes enables this integration. See Integration with Calico with Flannel Networking for more information.