Learning center

Explain a Kubernetes admission rejection after auth can-i says yes

Separate permission to submit an API request from permission to persist the submitted object. Admission runs after authentication and authorization and can reject an object with otherwise authorized attributes.

Suppose a fictional deployment operator gets yes from kubectl auth can-i create deployments.apps -n reports. The server then rejects the manifest because a validating admission policy requires a resource limit. Read the policy or webhook name from the server's response and inspect its applicable binding and match conditions. Compare the rejected field with the submitted manifest. That read-only comparison can explain the refusal even when the authorization result is yes. Kubernetes admission controllers ยท Validating admission policy

If the object does not meet the intended rule, take the manifest and violated requirement to its owner. A genuine policy exception belongs with the admission policy owner and should preserve the intended scope. The authorization query has no object body to validate.

Trace another denied request.

One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. Eligibility and fair-use terms.

Start free with GitHub

Related reading