Introducing Kubernetes-Native ... Note

Introducing Kubernetes-Native Policy Validation with CEL and VAP in Azure Policy

Azure Policy for Kubernetes now integrates with Gatekeeper and native Kubernetes Validating Admission Policy (VAP) using Common Expression Language (CEL). This integration, leveraging Kubernetes 1.30's VAP, offers a more efficient and reliable in-process policy enforcement. It reduces latency for admission decisions, simplifies constraint template creation, and enables stronger fail-close behavior. Users retain Azure Policy's benefits like centralized assignment, scope management, and safe rollout controls. Previously, Azure Policy relied on OPA Rego-based evaluation through an admission webhook. The new approach uses CEL, a lightweight language designed for Kubernetes validation, allowing policies to run inside the Kubernetes API server. This in-tree evaluation enhances reliability by removing dependence on external services. Azure Policy acts as the governance layer, while CEL provides the validation logic. To implement a CEL policy, you create a CEL constraint template, which is then packaged inside an Azure Policy definition. An example demonstrates limiting deployment replicas to five using this two-layered approach. The constraint template defines the validation logic, and the Azure Policy definition wraps it with governance features. The policy is assigned to AKS clusters, and compliance is monitored through the Azure Policy console. This feature requires Kubernetes v1.30 or later and the Azure Policy add-on for Kubernetes.