Kubernetes networking can be complex to scale due to issues like growing iptables rules, but newer solutions are helping. Pod networking uses CNI plugins like flannel or Calico to assign each pod an IP and allow communication. Service networking uses kube-proxy and iptables or IPVS for load balancing to pods. DNS is used to resolve service names to IPs. While Kubernetes networking brings flexibility, operators must learn the nuances of their specific CNI plugin and issues can arise, but the ecosystem adapts quickly to new needs and changes don't impact all workloads.
9. My journey with Kubernetes
2 YEARS FULL TIME IN KUBERNETES PROJECTS
MAINTAINER OF A YOUTUBE KUBERNETES CHANNEL
CKA; PART OF THE TEAM THAT CREATED CKAD
29. Overlays
10.244.1.0/24 dev cni0 proto kernel scope link src 10.244.1.0
10.244.0.0/16 dev flannel proto kernel scope link src 10.244.1.1
Pod
10.244.2.1
10.244.1.0/24
10.244.0.0/16
10.244.2.0/24
10.244.0.0/16
cni0
flannel0
cni0
flannel0
Pod
10.244.1.1
192.168.0.1 192.168.0.2
Src: 10.244.1.1
Dst: 10.244.2.1
30. Overlays
Src: 192.168.0.1
Dst: 192.168.0.2
Src: 10.244.1.1
Dst: 10.244.2.1
Pod
10.244.2.1
10.244.1.0/24
10.244.0.0/16
10.244.2.0/24
10.244.0.0/16
cni0
flannel0
cni0
flannel0
Pod
10.244.1.1
192.168.0.1 192.168.0.2
10.244.1.0/24 dev cni0 proto kernel scope link src 10.244.1.0
10.244.0.0/16 dev flannel proto kernel scope link src 10.244.1.1
32. BGP (Calico)
10.244.162.131 dev cali12d4a061371 scope link
10.244.143.129 via 192.168.0.2 dev eth0
10.244.143.129 dev cali12d4bf881 scope link
10.244.162.131 via 192.168.0.1 dev eth0
Pod
10.244.162.131/32 10.244.143.129/32calixxxx calixxxx
Pod
10.244.162.131
192.168.0.1 192.168.0.2
BGP BGP
10.244.143.129
33. BGP (Calico)
10.244.162.131 dev cali12d4a061371 scope link
Pod
10.244.162.131/32 10.244.143.129/32calixxxx calixxxx
Pod
10.244.162.131
192.168.0.1 192.168.0.2
BGP BGP
10.244.143.129
34. BGP (Calico)
10.244.143.129 via 192.168.0.2 dev eth0
Pod
10.244.162.131/32 10.244.143.129/32calixxxx calixxxx
Pod
10.244.162.131
192.168.0.1 192.168.0.2
BGP BGP
10.244.143.129
48. GROWS LINEARLY WITH PODS AND SERVICES
THERE IS NO ROOM FOR MORE FEATURES
FOR EVERY CHANGE, THE WHOLE TABLE NEEDS
TO BE RESYNC
iptables mode (default)