Interview Prep/Real-World Interview/Kubernetes cluster-level

In a cluster with 6,000 Services, endpoint changes take minutes to apply; during rollouts traffic hits pods that are already gone, and kube-proxy CPU spikes on every node.

AdvancedTroubleshootingKubernetes cluster-level
Answer

Likely causes → kube-proxy in iptables mode rewrites very large rule sets on each change, and rule evaluation is linear. At thousands of Services and tens of thousands of endpoints, each sync takes seconds to minutes, so the dataplane lags behind the API.

Diagnose →

kubectl -n kube-system get cm kube-proxy -o yaml | grep mode
kubectl debug node/<node> -it --image=nicolaka/netshoot -- sh -c 'iptables-save | wc -l'

Watch kubeproxy_sync_proxy_rules_duration_seconds and kubeproxy_network_programming_duration_seconds.

Fix → Move to a dataplane that scales: kube-proxy nftables mode (GA in 1.33) or IPVS, or replace kube-proxy with Cilium eBPF. Tune iptables.minSyncPeriod meanwhile to batch updates.

Prevent → Track Service and endpoint counts as a capacity metric, clean up unused Services, and make the dataplane decision before the cluster hits that scale.

All Real-World Interview questions Roadmap: Interview readiness

More on Kubernetes cluster-level