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

Taught in

References

Certification courses