Interview Prep/Real-World Interview/Scaling and performance

The HPA is configured but pods don't scale even though the app is slow. Why?

BeginnerScenarioScaling and performance
Answer

Situation read → Either the HPA can't read metrics, or the metric it scales on isn't the one that's saturated.

What I'd do →

  1. Check the HPA status:
kubectl get hpa api -n prod
kubectl describe hpa api -n prod
  1. If targets show <unknown>: metrics-server isn't running or pods have no CPU requests set (CPU utilisation is a percentage of requests).
  2. If CPU is low but the app is slow: the bottleneck is elsewhere (DB, I/O, thread pool, downstream calls). Scaling on CPU won't help; scale on RPS or queue depth with KEDA or a custom metric, or fix the bottleneck.
  3. If it's at maxReplicas: raise it, and check pending pods for cluster capacity.
  4. Check behavior settings; a long stabilisation window delays scale-up.

Why → HPA only scales on what you tell it. CPU-based scaling for an I/O-bound service never triggers.

Interview tip → "No requests set means no CPU-based HPA" is the quick win.

All Real-World Interview questions Roadmap: Interview readiness

More on Scaling and performance