CNI - Container Network Interface
RFCs for K8s Networking
/etc/cni/net.d
Check the /etc/cni/net.d directory for configuration about CNI
Bridge
Bridge is a plugin for the CNI. Bridge takes care of all the aspects of connecting a container to a namespace.
bridge add {containerId} {nameSpace:/var/run/netns/{nameSpaceId}}
- Creates the bridge network if needed
- Creates the veth pairs
- Attaches VETHs to namespaces and to the bridge
- Assigns an IP address
- Brings up interface
- Enables NAT
The plugin is invoked at add/delete of containers.