An aggregated API (`kubectl get --raw /apis/metrics.k8s.io/v1beta1`) returns `Error from server (ServiceUnavailable): the server is currently unable to handle the request`, and many tools print discovery warnings.
IntermediateTroubleshootingControl plane, RBAC, webhooks and autoscaling
Answer
Likely causes → The API server cannot reach the backing Service of the APIService: Pods down, NetworkPolicy blocking the control plane, or on EKS/private clusters the cluster security group does not allow the control plane to reach the Pod port.
Diagnose →
kubectl get apiservice v1beta1.metrics.k8s.io -o yaml | yq '.spec.service, .status.conditions'
kubectl get pods -n kube-system -l k8s-app=metrics-server -o wide
Fix → Bring the backend up, allow ingress from the control plane to the Pod port (e.g. 10250 or 4443 for metrics-server) in security groups and NetworkPolicies.
Prevent → Include aggregated APIs in health dashboards; broken discovery breaks namespace deletion, kubectl and GitOps tools.
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