Myth: Kubernetes ClusterIP Services always distribute traffic using a round-robin algorithm.
Reality: The default iptables mode of kube-proxy does not use round-robin. Instead, it uses random probability-based selection for load balancing.
๐ How It Actually Works:
kube-proxy sets up NAT rules using iptables.
When a request hits a ClusterIP, iptables randomly selects one of the backend pods.
The selection is not true round-robin but statistically distributed.
๐ฅ Want True Round-Robin?
โ Use kube-proxy in IPVS mode:
Supports round-robin (rr), least connections (lc), and other scheduling methods.
Enable it with:
kube-proxy --proxy-mode=ipvs
โ Use an external load balancer (e.g., NGINX, HAProxy) if strict round-robin is needed.
๐ Kubernetes is full of surprisesโwhat other myths have you encountered? Drop them in the comments!

Top comments (0)