Compare kube-proxy iptables mode and IPVS mode.
IntermediateScenarioKubernetes Networking
Answer
Situation read → Both implement Services on each node, with different scaling profiles.
What I'd do →
- iptables mode creates chains of rules per service and endpoint, evaluated linearly, and updates rewrite large rule sets
- IPVS mode uses kernel hash tables and supports more algorithms (rr, lc, sh) with O(1) lookups at scale
- Check mode:
kubectl -n kube-system get cm kube-proxy -o yaml | grep mode - List with
ipvsadm -Lnoriptables -t nat -L KUBE-SERVICES | head - Cilium can replace kube-proxy with eBPF
Why → At thousands of services, linear iptables lookups and full rewrites become slow.
Interview tip → Say you move to IPVS or eBPF once the service count is in the thousands.
More on Kubernetes Networking
Explain the Kubernetes networking model in one minute.BeginnerClusterIP, NodePort and LoadBalancer: when do you use each?BeginnerHow does a pod find another service by name?BeginnerService versus Ingress: what is the difference?BeginnerWhat does a CNI plugin do and which ones do you know?BeginnerHow do you reach a pod from your laptop for debugging without exposing it?Beginner