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

`kubectl get hpa` shows `TARGETS <unknown>/70%` and the HPA never scales, even under heavy load.

BeginnerTroubleshootingKubernetes cluster-level
Answer

Likely causes → The HPA can't read metrics: metrics-server isn't installed or is failing (often a kubelet TLS error), or the pods have no CPU request, so a percentage target can't be calculated.

Diagnose →

kubectl describe hpa web | grep -A5 Conditions
kubectl get apiservice v1beta1.metrics.k8s.io
kubectl top pods
kubectl -n kube-system logs deploy/metrics-server | tail
kubectl get deploy web -o jsonpath='{.spec.template.spec.containers[*].resources.requests}'

Fix → Install or repair metrics-server, and set CPU requests on every container in the pod (including sidecars).

Prevent → Include metrics-server in the cluster baseline, require resource requests via policy, and alert on HPAs whose ScalingActive condition is False.

All Real-World Interview questions Roadmap: Interview readiness

More on Kubernetes cluster-level