Networking in Kubernetes isn't as intuitive as people expect.
Here's what helped me understand it:
- Every Pod gets its own IP
- All Pods on a Node share the same network namespace
- Services act as virtual IPs backed by endpoints (Pods)
-
kube-proxy
sets up NAT rules for cluster trafficDebug tip: use
kubectl exec
into busybox or alpine pod to test DNS/HTTP endpoints internally.