Container Network Interface (CNI)
- Specification to configure network interfaces in Liunx Containers
- Concerned with connecting (add) and disconnecting(delete) containers to the network
- It is network model with connectivity rules:
POD <======> POD means pod to pod communication
NODE <=======> POD means Node to pod communication - CNI comes with networking plugins like BRIDGE, VLAN, IPVLAN,MACVLAN, DHCP, host-local
- Third-Party plugins like Calico, Weave network, flannel, NSX
Why CNI
- Networking can be highly environment-specific
- Different projects seek to solve the networking challenges - with potential overlap
- Makes standards for common networking
CNI in Kubernetes
- /opt/cni/bin/ show all the supported cni pluggins executeables
- ls /etc/cni/net.d/ shows which plugin is used
- cat /etc/cni/net.d/10-calico.conflist (if you are using calico plugin) gives more information about the plugin
COMMENTS