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.
More on Control plane, RBAC, webhooks and autoscaling
A developer gets `Error from server (Forbidden): pods is forbidden: User "[email protected]" cannot list resource "pods" in API group "" in the namespace "payments"`.BeginnerA CI pipeline fails with `deployments.apps "api" is forbidden: User "system:serviceaccount:ci:deployer" cannot patch resource "deployments" in API group "apps" in the namespace "prod"`.BeginnerA user can `get pods` but `kubectl logs` fails with `cannot get resource "pods/log"` and `kubectl exec` fails with `cannot create resource "pods/exec"`.BeginnerCreating a RoleBinding fails with `is attempting to grant RBAC permissions not currently held`.IntermediateEvery `kubectl apply` fails with `Internal error occurred: failed calling webhook "validate.kyverno.svc-fail": failed to call webhook: Post "https://kyverno-svc.kyverno.svc:443/validate/fail?timeout=10s": context deadline exceeded`.AdvancedCreating a Certificate fails with `failed calling webhook "webhook.cert-manager.io": ... no endpoints available for service "cert-manager-webhook"`.Intermediate