Interview Prep/Real-World Interview/Scaling and performance

Pods are Pending during a traffic spike because the cluster is out of capacity. What do you do now and long term?

IntermediateScenarioScaling and performance
Answer

Situation read → The HPA did its job; the node layer didn't keep up.

What I'd do →

  1. See why:
kubectl get pods -n prod --field-selector=status.phase=Pending
kubectl describe pod <pending> -n prod | tail -5
# 0/12 nodes are available: 12 Insufficient cpu.
  1. Check the node autoscaler logs (Karpenter or Cluster Autoscaler): hitting its limits, ASG max size, EC2 vCPU quota, InsufficientInstanceCapacity for one instance type, or no free IPs in the subnet.
  2. Immediate: raise the limit, or allow more instance types in the Karpenter NodePool.
  3. Long term: keep headroom with low-priority placeholder pods (overprovisioning) that get preempted when real pods need space, and diversify instance types.
  4. Right-size requests; inflated requests waste capacity and trigger this sooner.

Why → New nodes take 1–3 minutes; overprovisioning makes scale-up feel instant.

Interview tip → Mention placeholder pods with a negative PriorityClass for headroom.

All Real-World Interview questions Roadmap: Interview readiness

More on Scaling and performance