Fig 6Pod networking & ServicesSwitch the Service type belowbackend → 10.96.0.20 · 3 endpoints · ClusterIP
replicas 3
Pod
Node
Pod IP
Service
apiVersion: v1
kind: Service
metadata: { name: backend }
spec:type: ClusterIP # or NodePort, LoadBalancer
selector: { app: backend } # which pods are endpoints
ports: [{ port: 80, targetPort: 8080 }]
Solid dot: a packet addressed to a pod IPRinged dot: addressed to the Service's ClusterIP (or a DNS query), before kube-proxy rewrites itLedger at the back: the EndpointSlice, one lamp per ready pod IPEvery pod gets its own IP from its node's range, and any pod can reach any other directly over the pod network. Pods come and go and change IPs, so clients use a Service instead: a stable name in cluster DNS and a stable virtual IP. The Service selects pods by label and lists the ready ones in its EndpointSlice; kube-proxy on every node turns traffic for the virtual IP into traffic for one of those pod IPs. NodePort opens the same port on every node for outside traffic, and LoadBalancer puts a cloud load balancer in front of those ports.