kubernetes
admission_error
ai_generated
true
Error from server: admission webhook denied the request
ID: kubernetes/k8s-admission-webhook-denied
85%Fix Rate
88%Confidence
65Evidence
2023-06-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 8 | active | — | — | — |
Root Cause
A validating or mutating admission webhook rejected the API request. The resource does not comply with the webhook's policy.
genericWorkarounds
-
90% success Read the denial message to understand which policy was violated and fix the resource spec
kubectl apply -f resource.yaml 2>&1 | grep 'denied the request' — the message usually explains exactly what's wrong
Sources: https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/
-
85% success Check which webhooks are configured and their rules: kubectl get validatingwebhookconfigurations,mutatingwebhookconfigurations
kubectl get validatingwebhookconfigurations -o yaml to see rules and namespaceSelector
Sources: https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/
Dead Ends
Common approaches that don't work:
-
Delete the webhook configuration to bypass validation
75% fail
Removes security policies — the webhook exists for a reason and may be required by compliance
-
Retry the same request hoping it will pass
95% fail
Admission webhooks are deterministic — same input yields same denial
Error Chain
Preceded by:
Frequently confused with: