ValidatingAdmissionPolicy

A built-in Kubernetes admission check, written in CEL, that rejects requests whose objects break a rule, with no webhook server to run.

In more detail

The policy holds the CEL validations and a message, and a ValidatingAdmissionPolicyBinding says where it applies and whether to deny, warn or audit. Because the API server evaluates it in-process, there is no webhook to go down or time out. A rule that only checks containers can miss initContainers, so good policies check both.

Example

validations:
  - expression: "object.spec.containers.all(c, c.image.startsWith('registry.example.com/'))"

Related terms

Taught in

References

Certification courses