Failed calling webhook
The API server calls admission webhooks synchronously. If one doesn’t answer and its failurePolicy is Fail, every request it matches is rejected.
Other variants: no endpoints available for service "policy-webhook", x509: certificate signed by unknown authority, connection refused.
Diagnose in order
Section titled “Diagnose in order”- Which webhook and which Service? Both are in the message. List the configurations:
kubectl get validatingwebhookconfigurations,mutatingwebhookconfigurations. - Are its pods running?
kubectl get pods -n policy. No endpoints is the most common cause. - Can the API server reach it? On some managed platforms the control plane reaches pods only on specific ports, so a webhook on an unusual port times out.
- Certificate errors mean the configuration’s
caBundledoesn’t match the webhook’s certificate.
Unblock, then fix
Section titled “Unblock, then fix”Restore the webhook’s pods first if you can. If the webhook blocks its own recovery (it matches its own namespace) or the cluster is stuck, back up the configuration and remove it:
kubectl get validatingwebhookconfiguration <name> -o yaml > webhook-backup.yamlkubectl delete validatingwebhookconfiguration <name>Then restore it once the webhook is healthy. If it’s a security policy engine, removing it switches the control off, so record the window in your incident log.
Prevent repeats: exclude kube-system and the webhook’s own namespace with a namespaceSelector, set timeoutSeconds to a few seconds, and run at least two replicas.
Read next: Control plane failures.