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

HPA shows `TARGETS <unknown>/70%` and events say `failed to get cpu utilization: missing request for cpu in container "app" of Pod "api-7d..."`.

BeginnerTroubleshootingControl plane, RBAC, webhooks and autoscaling
Answer

Likely causes → CPU utilisation targets are a percentage of the request. A container without a CPU request (including sidecars injected by a mesh) makes the calculation impossible.

Diagnose →

kubectl describe hpa api | sed -n '/Conditions/,$p'
kubectl get pod api-x -o jsonpath='{range .spec.containers[*]}{.name}{" "}{.resources.requests.cpu}{"\n"}{end}'

Fix → Set CPU requests on every container in the Pod, including sidecars (mesh injection annotations allow setting proxy requests). Or use a ContainerResource metric to scale on the app container only.

Prevent → Admission policy requiring CPU requests; LimitRange defaultRequest as a backstop.

All Kubernetes questions Roadmap: Kubernetes networking, storage & scaling

More on Control plane, RBAC, webhooks and autoscaling