|
This is unreleased documentation for Admission Controller 1.36-dev. |
Kubewarden Admission Controller vs Kyverno
|
This page is from May 2026. Both projects may have evolved since then. If you find something is missing or inaccurate, please file an issue or open a PR using the link at the bottom of the page. |
Both Kyverno and Kubewarden, from which Kubewarden Admission Controller is derived, are open source projects and part of CNCF.
This table provides a comparison between Kyverno and Admission Controller. Topics requiring more information have links to further explanation.
| Feature | Kyverno | Admission Controller |
|---|---|---|
Validation |
✅ |
✅ |
Mutation |
✅ |
✅ |
Generation |
✅ |
❌ |
Deletion |
✅ |
❌ |
Image verification |
✅ |
✅ |
Policy language [1] |
CEL (Kyverno DSL deprecated) |
CEL, Rego, Go, Rust,… |
Context aware [2] |
✅ |
✅ |
Validating non-Kubernetes resources [3] |
✅ |
✅ |
Policy distribution [4] |
embedded into Kubernetes CR |
Container registry, or embedded into Kubernetes CR (CEL) |
CI/CD integration [5] |
✅ |
✅ |
Policy enforcement modes [6] |
deny, warn |
deny, warn |
Deployment mode [7] |
single evaluation server |
multiple evaluation servers |
Background checks [8] |
✅ |
✅ |
Types of policies
Both Kyverno and Admission Controller can write validation, mutation and image verification policies. These policies can target any kind of Kubernetes resource, including Custom Resources.
Kyverno also supports additional policy types that Admission Controller does not provide:
-
GeneratingPolicy: automatically creates or clones Kubernetes resources based on triggers (for example, creating a NetworkPolicy when a new Namespace is created).
-
DeletingPolicy: deletes matching resources based on a schedule.
Writing policies
Kyverno has historically used its own
Domain Specific
Language based on JMESPath and YAML overlay patterns to write policies.
This traditional language, used through the ClusterPolicy and Policy
Custom Resources, has been
deprecated
as of Kyverno v1.17 (January 2026) and is planned for removal in v1.20 (October 2026).
The current recommended approach for writing Kyverno policies is
CEL (Common Expression
Language), used through the new ValidatingPolicy, MutatingPolicy,
GeneratingPolicy, DeletingPolicy, and ImageValidatingPolicy Custom
Resources introduced starting from Kyverno v1.14.
Admission Controller supports writing policies using CEL, the same language now adopted by Kyverno. Both projects can also run native Kubernetes ValidatingAdmissionPolicy (VAP) resources.
In addition, Admission Controller supports writing policies using traditional programming languages (like Go, Rust and others) or other Domain Specific Languages like Rego.
|
Admission Controller provides experimental support for policies written using Kyverno’s traditional DSL through the kyverno-dsl policy available on ArtifactHub. This can help users migrating from Kyverno’s legacy policy format. |
Context aware
Sometimes a policy needs data about the current state of the cluster to make a validation or mutation decision. For example, a policy validating Ingress resources might need to know other Ingress resources already defined in the cluster to ensure no clashes happen. Admission Controller calls these policies "context aware".
Both Kyverno and Admission Controller support these types of policies.
When deploying Kyverno, a Kubernetes administrator decides which types of cluster data to make available to the policies at evaluation time. However, this data is then accessible by all the policies deployed.
For example, if a Kyverno policy requires access to Kubernetes Secrets, all the other policies deployed are able to read this data as well.
Conversely, Admission Controller provides a granular access to cluster resources. Each policy has access only to the resources that the Kubernetes administrator specifies. Attempting to read unauthorized data is immediately blocked and reported to the cluster administrators.
Validating non-Kubernetes resources
Both Kyverno and Admission Controller can validate arbitrary JSON data beyond Kubernetes resources.
Kyverno provides this capability through its ValidatingPolicy type, by setting
the spec.evaluation.mode field to JSON.
See the Kyverno ValidatingPolicy documentation
for details.
Admission Controller provides the same capability through raw policies, which can evaluate policies against arbitrary JSON input data without requiring a running Kubernetes cluster.
Policy distribution
Kyverno and Admission Controller CEL policies have the source code of the policy embedded in the Custom Resource defining a policy in Kubernetes.
Additionally, Admission Controller policies can have the source code of the policy managed like container images (for Rego, Go, Rust, …). Once built, they’re pushed into container registries as OCI artifacts.
You can sign and verify Admission Controller policies using container image tools like
cosign, from the Sigstore project.
You can distribute Admission Controller policies among geographically distributed container registries using the traditional tools and processes adopted for container images.
CI/CD integration
Both Kyverno and Admission Controller are managed using GitOps methodologies.
Kyverno provides the
kyverno CLI for testing
policies in CI/CD pipelines. It includes the kyverno test command for running
predefined test cases and the kyverno apply command for testing resources
against policies. A
GitHub Action
is also available for integrating Kyverno CLI into GitHub Actions workflows.
Admission Controller policies have CI/CD pipelines like traditional microservices. Usually their source code lives in a Git repository and then, using traditional CI/CD systems, unit tests run against it. You write unit tests using the testing frameworks of the language used to write the policy. Once all the tests pass, you compile the policy to WebAssembly and push it to a container registry. This kind of pipeline is usually maintained by the policy author.
Kubernetes administrators typically maintain other automation pipelines that react to new releases of the policy (using automation tools like Dependabot, Renovate bot, updatecli and others), or to changes to the policy configuration.
The pipeline tests the policy against different types of requests. You can do
the testing using the kwctl CLI tool,
without requiring a running Kubernetes cluster. The kwctl CLI tool uses the
same evaluation engine used by the Admission Controller stack deployed in a Kubernetes
cluster.
Policy enforcement modes
Both Kyverno and Admission Controller can deploy policies using two different operation modes:
-
Enforce / protect: violation of a policy causes the request to be rejected. In Kyverno, this is configured via
failureAction: Enforce. In Admission Controller, this is configured as theprotectmode. -
Audit / monitor: violation of a policy doesn’t cause rejection but is logged and reported. In Kyverno, this is configured via
failureAction: Audit. In Admission Controller, this is configured as themonitormode.
Deployment mode
Kyverno runs as a set of Kubernetes Deployments (admission controller, background controller, reports controller, cleanup controller). The admission controller handles all policy evaluations. While it supports running multiple replicas for high availability, all replicas evaluate all policies. There is no way to assign specific policies to specific instances.
Conversely, Admission Controller allows definition of multiple evaluation servers.
You define these servers by a Custom Resource called PolicyServer.
When declaring a Admission Controller policy, the Kubernetes administrator decides which
PolicyServer host it.
|
The Each |
This allows interesting scenarios like the following ones:
-
Deploy critical policies to a dedicated Policy Server pool.
-
Deploy the policies of a noisy tenant to a dedicated Policy Server pool.
Background checks
As policies are added, removed, and reconfigured the resources already in the cluster might become non-compliant.
Both Kyverno and Admission Controller have a scanner that operates in the background. This scanner evaluates resources already defined in the cluster and flags non-compliant ones.
Kyverno stores the results in PolicyReport and ClusterPolicyReport Custom
Resources following the format defined by the
Kubernetes
Policy working group. As of Kyverno v1.15, alpha support for
openreports.io is also available.
Admission Controller stores the results inside of a set of the Reports Custom Resources defined by openreports.io.