Nodes in the cluster show high CPU but pods report low usage. How do you explain it?
AdvancedScenarioScaling and performance
Answer
Situation read → Something outside your app containers is consuming CPU: system daemons, sidecars, the kubelet, or the hypervisor.
What I'd do →
- On the node, see what is actually busy:
top -o %CPU
# check %st (steal) and %sy (system)
- High steal (
%st): noisy neighbours on burstable instances or exhausted T-series CPU credits. Move to non-burstable types. - High system time: heavy networking (lots of iptables rules with kube-proxy in iptables mode), conntrack churn, or disk I/O.
- Daemonsets and sidecars: log shippers, security agents and service-mesh proxies can be significant. Check
kubectl top pod -A --containerson that node. - Reserve resources for system components with kubelet
systemReservedandkubeReservedso pods can't starve them.
Why → Kubernetes only accounts for containers; node-level overhead must be measured separately.
Interview tip → T3 CPU credits are a real cause of "random" slowness; mention them.
More on Scaling and performance
Traffic is expected to 10x for a sale next week. How do you prepare the platform?IntermediateThe HPA is configured but pods don't scale even though the app is slow. Why?BeginnerPods are Pending during a traffic spike because the cluster is out of capacity. What do you do now and long term?IntermediateThe database CPU is at 95% and the API is timing out. What's your approach?Intermediate"Too many connections" errors from Postgres after scaling the app out. How do you fix it?IntermediateLatency is fine on average but p99 is terrible. Where do you look?Advanced