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.
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