Every platform team eventually hits the same failure mode with admission webhooks: a misconfigured or overloaded policy pod stalls deployments across the entire cluster, or an expired webhook TLS certificate blocks node and pod updates during an incident. ValidatingAdmissionPolicy removes that external hop. Evaluated directly inside kube-apiserver using the Common Expression Language (CEL), it reached General Availability in Kubernetes 1.30 and has become the standard foundation for lightweight, declarative policy enforcement.
For teams running on Google Kubernetes Engine (GKE), native admission policies are no longer just a performance optimization. Google Cloud has announced the deprecation of Policy Controller with end of support scheduled for late 2027, pointing teams toward ValidatingAdmissionPolicy as the native replacement. Moving early gives you simpler GitOps manifests, predictable API server latency, and one fewer control-plane dependency to patch.
How ValidatingAdmissionPolicy works inside the API server
Traditional validating webhooks force kube-apiserver to serialize the admission request, open a TLS connection to an external service, and wait for an AdmissionReview response. ValidatingAdmissionPolicy compiles CEL expressions directly into the API server's admission chain under the admissionregistration.k8s.io/v1 API group. Because no network call leaves the control plane, policy checks cannot fail due to DNS hiccups, webhook pod evictions, or network policy mistakes.
Core building blocks: Policy, Binding, and Parameters
A complete policy setup separates the rule definition from where and how it is enforced using three Kubernetes resources:
- ValidatingAdmissionPolicy: defines matchConstraints (API groups, versions, resources, and operations such as CREATE or UPDATE), optional matchConditions to narrow evaluation, and one or more CEL validations with custom error messages.
- ValidatingAdmissionPolicyBinding: attaches a policy to specific namespaces or label selectors and sets validationActions—Deny, Warn, or Audit—so you can roll out rules safely before blocking workloads.
- Parameter resources (paramKind and paramRef): optional ConfigMaps or Custom Resource Definitions that supply environment-specific thresholds, such as allowed container registries or maximum replica limits, without duplicating policy YAML.
Scoping enforcement with bindings
That separation matters in multi-team clusters. Security engineers can own the ValidatingAdmissionPolicy cluster-wide, while platform teams bind it with Warn in staging namespaces and Deny in production, passing each environment's approved values through a parameter ConfigMap.
When CEL replaces webhooks and when it does not
In-process CEL is ideal for structural, deterministic checks on the incoming Kubernetes object: blocking privileged containers, requiring specific ownership labels, restricting hostPath volumes, disallowing latest image tags, or preventing insecure external webhook URLs. Because CEL is sandboxed and non-Turing-complete, expressions execute in microseconds with bounded CPU and memory.
However, ValidatingAdmissionPolicy is not a drop-in replacement for every policy engine feature. CEL expressions cannot make external HTTP calls to verify an image signature in a remote registry or query an external inventory API during admission. For supply-chain verification, image signing, and SBOM attestation, you still pair native admission rules with dedicated tooling as part of your Kubernetes GitOps admission and provenance workflow.
Similarly, if you need to inject sidecars or mutate defaults on the fly, check whether your cluster supports MutatingAdmissionPolicy (introduced in newer Kubernetes releases as a CEL-based companion to ValidatingAdmissionPolicy) or whether a scoped mutating webhook is still required. On GKE Autopilot, managed safeguards also exclude system namespaces such as kube-system from user-defined mutating policies to protect cluster stability.
Practical CEL guardrails for production clusters
The easiest way to adopt ValidatingAdmissionPolicy is to target high-signal guardrails that complement Pod Security Standards rather than reimplementing them from scratch. If you have already completed a Kubernetes Pod Security Standards migration for baseline and restricted pod profiles, use CEL policies to close the remaining organizational gaps.
High-signal policies to deploy first
- Registry allowlisting: enforce that every container and initContainer image starts with your approved Artifact Registry or private mirror prefix, parameterized per environment via a ConfigMap.
- Resource governance: require CPU and memory requests on production Deployments and cap replica counts in shared dev namespaces to prevent accidental noisy-neighbor exhaustion.
- Control-plane hardening: block creation of ValidatingWebhookConfiguration or MutatingWebhookConfiguration objects that use external clientConfig.url endpoints instead of in-cluster services.
- GKE hardware and ComputeClass controls: restrict expensive GPU or specialized nodeSelector and toleration combinations to authorized namespaces so AI workloads do not spill onto general-purpose pools.
Keep each policy focused on one invariant and write clear failure messages that tell the developer exactly what field failed and how to fix it. A cryptic CEL evaluation error drives teams to ask for namespace exemptions instead of fixing their manifests.
Safe rollout: Audit, Warn, then Deny
Turning on Deny across an active cluster without testing is the fastest way to break CI/CD pipelines. ValidatingAdmissionPolicyBinding supports three validationActions—Audit, Warn, and Deny—that can be combined in a single binding. Start by deploying every new policy with Audit and Warn enabled so API server responses return warnings to kubectl and CI logs while recording policy violations in Kubernetes audit events.
Four-step promotion to enforcement
- Inventory existing workloads: run the policy in Audit and Warn mode for at least one full release cycle and query audit logs for policy annotations.
- Scope exclusions explicitly: exclude kube-system and managed operator namespaces via namespaceSelector or matchConditions rather than disabling the policy globally.
- Use failurePolicy carefully: set failurePolicy to Fail for security-critical invariants once tested, and rely on CEL variables and has() checks so optional fields do not trigger runtime evaluation errors.
- Promote to Deny by environment: switch staging and production bindings to Deny via GitOps pull requests after warning counts drop to zero.
Treat policy resources as privileged control-plane configuration. Restrict who can create or modify ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding objects using the same rigor described in our Kubernetes RBAC least privilege guide, so a namespace admin cannot unbind their own guardrails.
Migrating from Policy Controller or Gatekeeper
If you are migrating off GKE Policy Controller or OPA Gatekeeper, avoid translating every Rego constraint blindly. Audit which constraints are actually enforced versus sitting in dry-run, drop rules already covered by Pod Security Admission, and group the remaining checks into parameterized ValidatingAdmissionPolicy templates. Test CEL expressions locally against representative manifests before applying bindings, and keep your admission rules alongside workload manifests in Git so policy changes follow the same review and rollback path as application code.