On this presentation, I talk about on how kubernetes enable network communications between pods on different nodes using multiple Containers Network Interface (CNI) plugins
in order to enable communication between nodes we need to have:
- Flat network
- All the pods should have an IP
- Traffic should flow to any direction
- no NAT : All the containers can communicate with each other directly without NAT
Pod to Pod Communications
we can enable pod 2 pod communication on L2 (Switching), L3 (Routing) or an Overlay Network. Pod 2 pod communication running on the same node is by IP L3. More commons scenarios are pod 2 pod on different nodes or networks.
- Calico one of the best performance network plugin as enable L3 network connectivity that uses BGP to route package between hosts. In addition Calico has the strongest network policy configurations
- Weave Net creates a mesh overlay network between each of the nodes in the cluster. Weave also provides strong network policy capability.
- Canal: Combination of best of Flannel and Calico, uses overlay network while still maintain a strong network policy capability.
- Flannel plugin uses an L3 overlay network. (VXLAN). It’s one of the easiest plugin to be installed and configured.
- NSX-t Plugin uses an overlay network VXLANs and runs on each Kubernetes node. It monitors container life cycle events, connects a container interface to the guest vSwitch, and programs the guest vSwitch to tag and forward container traffic between the container interfaces and the VNIC.