Cloud · Kubernetes · Security

Kubernetes admission policies in CEL: a playbook for retiring your webhooks

Admission webhooks have guarded Kubernetes clusters for years, at the cost of extra services that can slow or break the API server. Kubernetes now has built-in, declarative alternatives for both validation and mutation.

PlaybookSumanta Mukhopadhyay7 min read5 sources
#kubernetes#security#platform#governance
PLAYBOOK · CLOUD · KUBERNETES · SECURITY22 Oct 2026 · 20:15 GST

Every mature Kubernetes platform ends up with guardrails: containers must not run as root, images must come from approved registries, every workload needs an owner label, and some defaults should be injected automatically. For years the standard way to enforce them was admission webhooks, separate services the API server calls on every relevant request. They work, but they're more infrastructure to run, they add latency, and a failing webhook can block deployments across a cluster.

Built-in policies, in CEL

ValidatingAdmissionPolicy reached general availability in Kubernetes 1.30. It lets you express validation rules declaratively in Common Expression Language (CEL), evaluated inside the API server, as an alternative to validating webhooks12. The GA announcement walks through replacing a webhook that enforces least-privilege security context settings with an equivalent policy1.

MutatingAdmissionPolicy does the same for changes. The documentation describes it as a declarative, in-process alternative to mutating webhooks, with mutations defined as an apply configuration merged using server-side apply rules, or as a JSON patch3. The feature gate list shows it moving through alpha and beta to stable in v1.364.

A policy is made of a policy resource, a binding that scopes where it applies, and optional parameters, so one policy can be reused with different settings per namespace or environment23.

Webhooks, built-in policies, or a policy engine

Built-in CEL policiesWebhooks or policy engines
Runs whereInside the API serverSeparate services the API server calls
Failure modeNo extra service to go downWebhook outages can block or slow admission
LogicCEL expressions over the request and parametersArbitrary code or rich policy languages
External callsNot designed for themPossible, for example image signature checks
ReportingBasicOften richer reports and policy libraries

My rule of thumb: simple, high-volume guardrails move to built-in policies; checks that need external data or rich reporting stay in a policy engine.

The migration playbook

  1. Inventory webhooks and policies across clusters, including those installed by vendor charts, with their failure policies and timeouts.
  2. Classify each rule: expressible in CEL, needs external data, or needs complex logic.
  3. Write CEL equivalents for the first group, with test cases for allowed and rejected objects, kept in version control alongside your platform code.
  4. Roll out in audit or warn mode first, comparing results with the existing webhook before switching to deny.
  5. Use parameters and bindings to vary settings per environment instead of copying policies.
  6. Remove the old webhook only after the policy has matched its decisions in production for a period.

Every webhook you retire is one less service that can take down deployments at 2am. That operational simplicity is the main benefit, more than any feature.

Guardrails worth having on AI clusters

  • GPU workloads must declare an owner, cost centre and priority class, so costs and preemption are traceable, supporting AI cost allocation.
  • Model-serving pods must not run privileged and must come from approved registries.
  • Namespaces holding regulated data must carry labels that other controls depend on, such as region or data class, as in UAE health data localisation.
  • Training jobs must use the queueing and scheduling setup in Kubernetes gang scheduling rather than bypassing it.

How I can help

I design Kubernetes platforms with guardrails that are simple to operate, and review cluster security in technical due diligence. As a fractional CTO I can own the platform roadmap. Or analyse your challenge and bring the result to a call.

References
  1. 1
  2. 2
    Validating Admission PolicyKubernetes documentation
  3. 3
    Mutating Admission PolicyKubernetes documentation
  4. 4
    Feature gatesKubernetes documentation
  5. 5
FAQ

Common questions

What is ValidatingAdmissionPolicy?

A built-in, declarative way to validate Kubernetes API requests using Common Expression Language (CEL) expressions, as an alternative to validating admission webhooks. It reached general availability in Kubernetes 1.30.

What is MutatingAdmissionPolicy?

The equivalent for mutation: a declarative, in-process alternative to mutating admission webhooks that uses CEL to define changes, applied either as an apply configuration or a JSON patch. Its feature gate is listed as stable from Kubernetes 1.36.

Should I remove my policy engine?

Not necessarily. Built-in policies suit many common guardrails without running extra services. Policy engines still add value for reporting, complex logic, image verification and organisation-wide policy libraries. Many teams will use both.

Keep reading

Related

Open to advisory, fractional CTO & select builds

Let's talk about what you're building.

The fastest route is a free 30-minute call. Prefer to write? Send a message and I'll reply personally within two business days.

Start a conversation

How would you like to reach me?

Book a 30-min callFastest. Pick any open slot on my calendar.→ Write in GmailOpens a pre-filled draft in your browser.→ Use my email appOutlook, Apple Mail or your default client.→

I reply personally within two business days. US & UAE time zones.