Common Expression Language
A small, safe expression language from Google that Kubernetes uses to write rules, such as validation checks, inside its own objects.
In more detail
A CEL expression reads the object under review, for example object.spec.containers, and returns true or false. It cannot loop forever or touch the network, so the API server can run it on every request. ValidatingAdmissionPolicy uses it so you can write admission rules without running a webhook.
Example
object.spec.containers.all(c, c.image.startsWith('registry.example.com/'))Related terms
- ValidatingAdmissionPolicy — A built-in Kubernetes admission check, written in CEL, that rejects requests whose objects break a rule, with no webhook server to run.
- admission controller — A Kubernetes API server plugin that checks or changes each request after authentication and authorization, before the object is stored.
Taught in
- Allowed Registries: Admission That Refuses Images — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Signing And Verifying Images With Cosign — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Forty Minutes Of Yes: Admission Control — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep