Interview Prep/Networking/Kubernetes Networking

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 →

  1. iptables mode creates chains of rules per service and endpoint, evaluated linearly, and updates rewrite large rule sets
  2. IPVS mode uses kernel hash tables and supports more algorithms (rr, lc, sh) with O(1) lookups at scale
  3. Check mode: kubectl -n kube-system get cm kube-proxy -o yaml | grep mode
  4. List with ipvsadm -Ln or iptables -t nat -L KUBE-SERVICES | head
  5. 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.

All Networking questions Roadmap: Networking for DevOps

More on Kubernetes Networking