Interview Prep/Kubernetes/Control plane, RBAC, webhooks and autoscaling

HPA is at `maxReplicas` and still shows high CPU, but the service is slow. What do you check?

IntermediateTroubleshootingControl plane, RBAC, webhooks and autoscaling
Answer

Likely causes → The ceiling was reached; or the bottleneck is downstream (database, external API), so more Pods do not help; or new Pods are Pending for capacity.

Diagnose →

kubectl get hpa api
kubectl describe hpa api | grep -E 'ScalingLimited|AbleToScale'
kubectl get pods -l app=api | grep -c Pending

Fix → If Pods are Pending, fix cluster capacity. If downstream is the limit, scaling more will make it worse; add caching, connection limits or scale the dependency. Raise maxReplicas only when the app truly scales horizontally.

Prevent → Alert on ScalingLimited=True for long periods and load-test to find the real bottleneck.

All Kubernetes questions Roadmap: Kubernetes networking, storage & scaling

More on Control plane, RBAC, webhooks and autoscaling