Control Plane Errors — API Server, RBAC, Webhooks, Quotas and Finalizers

The failures that stop you before any workload runs: unreachable API servers, Forbidden, broken webhooks, stuck namespaces, quota, exec and logs dial errors, expired certificates, a full etcd and 429 throttling.

Overview

Control-plane errors stop you before any workload is involved. Every kubectl command, CI deploy and controller loop is an HTTPS call to the API server, and that call passes through a fixed chain: connect and TLS, authentication, API Priority and Fairness, authorization, admission, then storage in etcd. A few requests (exec, logs, port-forward) then leave the control plane again and dial the kubelet on the node. Each error on this page is one link in that chain breaking.

The method is outside-in: first prove you are talking to the right cluster and can reach it at all. Then read the rejection message word by word, because the API server nearly always names the rule that stopped you: the user, the verb, the webhook, the quota, the finalizer. Guessing from the HTTP code alone is how people end up editing RBAC to fix a webhook. The code-level theory (401 versus 403, 409, 410, 422, 429 and the 5xx family) lives in the companion topic on API server status codes; this page is about the operational failures and what to type.

The one idea to keep: find the link, then fix only that link. A connection timeout, an expired certificate, a Forbidden, a webhook outage and a full etcd all look like 'kubectl is broken', and their fixes have nothing in common.

Symptom to first command

Each symptom has one most likely cause and one first command that proves or rules it out. Learn these pairs and the first minute of any incident is mechanical.

  • connection refused, i/o timeout or TLS handshake timeout: the context is wrong, the network path is blocked, or the API server is unhealthy. Start with kubectl config current-context.
  • Error from server (Forbidden): ... cannot resource: no Role or ClusterRole grants that verb. Ask the authorizer with kubectl auth can-i -n prod --as=.
  • failed calling webhook or admission webhook ... denied the request: either the webhook is down under a Fail policy, or a real policy denied you. List the webhooks with kubectl get validatingwebhookconfigurations,mutatingwebhookconfigurations.
  • A namespace that stays Terminating: a finalizer has no controller left to clear it, or an APIService is unavailable. Read kubectl get namespace staging -o jsonpath='{.status.conditions}'.
  • A deploy applied but no new pods, with exceeded quota in events: the ResourceQuota is full, or a pod has no requests or limits. Run kubectl events -n prod --types=Warning.
  • error dialing backend on exec or logs only: the API server cannot reach the kubelet on port 10250. Test with kubectl get --raw /api/v1/nodes//proxy/healthz.
  • x509: certificate has expired, or sudden Unauthorized everywhere: control-plane or client certificates have expired. Run sudo kubeadm certs check-expiration.
  • etcdserver: mvcc: database space exceeded on every write: etcd hit its space quota and raised the NOSPACE alarm. Run etcdctl alarm list.
  • A controller logs too many requests (429): API Priority and Fairness is shedding that client's flow. Run kubectl get --raw /metrics | grep apiserver_flowcontrol_rejected_requests_total.

The map below puts those symptoms back on the chain, so you can see which link each one belongs to.

The sections that follow take one link each, starting with the most basic failure of all: not reaching the API server.

Key concepts

  • Request chain
  • RBAC is additive
  • failurePolicy
  • ValidatingAdmissionPolicy
  • Finalizer
  • ResourceQuota
  • API server to kubelet path
  • kubeadm certificate lifetime
  • etcd space quota and NOSPACE
  • API Priority and Fairness

Interview questions

  • On Monday morning kubectl against the self-managed prod cluster fails, and it worked on Friday. Walk me through it.
  • You installed a policy engine with a validating webhook on Pods. An hour later a node died and now no pods can be created anywhere, including the policy engine's own. How do you recover?
  • After upgrading the cluster to 1.35, the CI smoke test that runs kubectl exec as a read-only ServiceAccount starts failing with Forbidden. Nothing in RBAC changed. Why?
  • A pipeline applies a new Deployment version, reports success, but the new pods never appear and the old ones keep serving. Walk me through it.
  • kubectl logs and exec work for some pods and time out for others. How would you debug it, and how does it differ on EKS, AKS and GKE?
  • A namespace has been Terminating for a day after someone uninstalled an operator. What do you do, and what do you refuse to do?
  • Writes to a self-managed cluster fail with etcdserver: mvcc: database space exceeded. Recover it, then tell me what would be different on EKS.

Sign up free to read the full topic

More DevOps topics

Start free on Cariara · Coding problems · System design studio