Insights on Kubernetes networking
Engineer AbdelRahman Adel
Prepared by
Better understanding of the picture
Easier bug Fixing
Cleaner Solution
Evolution of Services’ communication model
Strongly Coupled Services
Coupling to a Gateway
Resolving names instead
Update Gateway when scaling out service.
Update DNS when Gateways change.
Still need to manually:
Kubernetes Model
Pod is a collection of containers sharing the same network namespace.
Each pod has a unique IP.
Pods can be viewed more like a VM.
Pod is the atomic unit of work.
IP 1
IP 2
IP 3
IP 4
IP 5
IP 6
IP 7
IP 8
IP 9
IP 1
IP 2
IP 3
IP 4
IP 5
IP 6
IP 7
IP 8
IP 9
Destination: IP3
Destination: IP3
Destination: IP3
Destination: IP3
12
3
4
Kubernetes is responsible to deliver packet once arrived at the correct node.
BUT
Its your network’s responsibility to deliver it to the correct node
Manually Configure our network ?
IP 1
IP 2
IP 3
IP 4
IP 5
IP 6
IP 7
IP 8
IP 9
Virtual IP Real IP
IP1 Node1
IP2 Node1
IP3 Node1
IP4 Node2
IP5 Node2
IP6 Node2
IP7 Node3
Third Party Plugin
Overlay Network
Flannel Software Defined Network
IP 1
IP 2
IP 3
IP 4
IP 5
IP 6
IP 7
IP 8
IP 9
Destination: IP3
4
Destination: Node1
Destination: IP3
Destination: Node1
Destination: IP3
Destination: IP3
Destination: IP3
Flannel Flannel Flannel
Cluster on Public Cloud?
AWS VPC CNI for Kubernetes
Google Compute Engine (GCE)
Services
IP 1
IP 2
IP 3
IP 4
IP 5
IP 6
IP 7
IP 8
IP 9
MessageHubService Message_ClusterIP
Message_ClusterIP IP 2
IP 3
IP 4
Message_ClusterIP IP 2
IP 3
IP 4
Message_ClusterIP IP 2
IP 3
IP 4
IP 1
IP 2
IP 3
IP 4
IP 5
IP 6
IP 7
IP 8
IP 9
MessageHubService Message_ClusterIP
Message_ClusterIP IP 2
IP 3
IP 4
Message_ClusterIP IP 2
IP 3
IP 4
Message_ClusterIP IP 2
IP 3
IP 4
IP 1
IP 2
IP 3
IP 7
IP 8
IP 9
MessageHubService Message_ClusterIP
Message_ClusterIP IP 2
IP 3
IP 4
Message_ClusterIP IP 2
IP 3
IP 4
IP 1
IP 2
IP 3
IP 7
IP 8
IP 9
MessageHubService Message_ClusterIP
Message_ClusterIP IP 2
IP 3
IP 9
Message_ClusterIP IP 2
IP 3
IP 9
Thank you

Cairo Kubernetes Meetup - October event Talk #2