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

A new deployment's pods stay Pending with "0/5 nodes are available: 5 Insufficient cpu. preemption: 0/5 nodes are available: 5 No preemption victims found for incoming pod."

BeginnerTroubleshootingKubernetes cluster-level
Answer

Likely causes → The scheduler places pods by requests, not real usage. The pod asks for more CPU than any node has left unrequested, or more than a whole node offers (a 6-CPU request on 4-vCPU nodes), and there's no autoscaler or it's at its maximum.

Diagnose →

kubectl describe pod web-7c9-abcde | tail -5
kubectl describe nodes | grep -A6 'Allocated resources'
kubectl get deploy web -o jsonpath='{.spec.template.spec.containers[*].resources}'

Fix → Lower the request to what the app really uses, add nodes (or raise the autoscaler max), or use a larger instance type for that workload.

Prevent → Set requests from measured usage (VPA recommendations), run Cluster Autoscaler or Karpenter, and alert on pods Pending longer than five minutes.

All Real-World Interview questions Roadmap: Interview readiness

More on Kubernetes cluster-level