Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is Kyverno?

Kyverno is a policy engine built for Kubernetes in which policies are themselves Kubernetes resources. It can validate, mutate, generate, and clean up objects, and verify container image signatures.

Illustration for the cybersecurity term Kyverno
Home / Blog / Cybersecurity Terms / What Is Kyverno?
17 November 2026

What Is Kyverno?

What Is Kyverno?

Kyverno is a policy engine designed for Kubernetes and nothing else. Its central decision is that policies are ordinary Kubernetes resources written in YAML, so a team that can read a Deployment can read a policy. There is no separate language to learn, policies are managed with kubectl and GitOps like everything else in the cluster, and results come back as Kubernetes objects. The project was created by Nirmata and is now developed under the Cloud Native Computing Foundation.

Four Kinds of Rule

Most policy engines only say no. Kyverno has four rule types, and the three beyond validation are what make it distinctive.

Validate accepts or rejects a resource. Mutate changes it on the way in — adding a default security context, injecting a label, setting imagePullPolicy. Generate creates related resources automatically, so a new namespace can arrive with a default NetworkPolicy, a resource quota, and a pull secret already in place. verifyImages checks container image signatures and attestations before admission.

A simple validation policy looks like this:

apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
  name: require-run-as-non-root
spec:
  validationFailureAction: Audit
  rules:
    - name: check-runasnonroot
      match:
        any:
          - resources:
              kinds: ["Pod"]
      validate:
        message: "Containers must set runAsNonRoot: true"
        pattern:
          spec:
            =(securityContext):
              =(runAsNonRoot): true

The mutate and generate capabilities are the reason teams often prefer Kyverno to a pure validation engine: instead of rejecting every manifest that forgets a default, you supply the default and reject only what genuinely conflicts with policy. That changes the developer experience from obstruction to assistance.

Signature Verification at Admission

The verifyImages rule integrates directly with Sigstore, so a cluster can require that every image was signed by a specific identity from a specific workflow, and optionally that it carries an SBOM or SLSA provenance attestation. This is the enforcement half of Cosign signing, and without it signing is a filing exercise. Kyverno also mutates the image reference to its digest after verification, which closes the gap where a tag is repointed between the admission check and the image pull.

Rolling It Out Without Breaking the Cluster

Kyverno runs as an admission webhook, which means a badly configured deployment can block every change to the cluster. The sequence that works:

  1. Start with validationFailureAction: Audit on every policy. Nothing is rejected; violations appear in PolicyReport resources.
  2. Read the reports for a fortnight and fix the workloads, not the policies.
  3. Switch policies to Enforce one at a time, beginning with namespaces whose owners can respond quickly.
  4. Exclude the kube-system namespace and your own infrastructure components explicitly, and review those exclusions on a schedule.
  5. Run kyverno apply and kyverno test in continuous integration so developers see policy failures on the pull request rather than at deployment.

Violations surface as PolicyReport and ClusterPolicyReport resources following the Kubernetes policy working group schema, which means compliance reporting is a kubectl get away rather than a bespoke export.

Kyverno or Gatekeeper?

The comparison with OPA Gatekeeper comes down to language and scope. Gatekeeper uses Rego, which is more expressive and transfers to policy problems outside Kubernetes, but it is a genuine learning investment and it only validates and mutates. Kyverno stays in YAML, adds resource generation and image verification, and is easier for a platform team to hand to application teams. Clusters that need policy beyond Kubernetes, or already run Open Policy Agent elsewhere, often choose Gatekeeper for consistency.

Neither replaces Pod Security Standards, which are built into Kubernetes and cover pod privilege with no extra components. The sensible layering is Pod Security Admission for the baseline, and a policy engine for everything it deliberately does not do: registry allow lists, required labels and limits, signature verification, and your own organisational rules.

FAQ – Frequently Asked Questions

Does Kyverno Require Learning a New Language?

No, and that is its main selling point. Policies are Kubernetes custom resources written in YAML, using pattern matching, anchors, and JMESPath expressions for the harder conditions. Anyone comfortable reading a Deployment manifest can read and modify a policy. Recent versions also support CEL expressions for cases where declarative patterns become awkward, but most policies never need them.

What Happens if the Kyverno Webhook Goes Down?

It depends on the failure policy. With failurePolicy set to Fail, which is the secure default for enforcing policies, admission requests are rejected when the webhook is unreachable, so a broken Kyverno can stop deployments cluster-wide. Run multiple replicas, exclude system namespaces so the cluster can recover itself, and test the failure mode deliberately before you rely on it in production.

Can Kyverno Fix Resources Instead of Rejecting Them?

Yes. Mutate rules modify incoming resources before they are stored, so you can add a default security context, set a required label, pin an image to its digest, or inject a sidecar annotation. Generate rules go further and create related objects, such as a default NetworkPolicy in every new namespace. Used carefully this reduces friction, but make mutations obvious or people will be confused by manifests that change on arrival.

Is Kyverno Enough for Pod Security on Its Own?

It can enforce the Pod Security Standards through a published policy set, and it covers much more besides. Many clusters still enable the built-in Pod Security Admission as a baseline because it needs no extra components and keeps working if the policy engine fails, then use Kyverno for the rules Pod Security Admission deliberately excludes, such as registry allow lists and image signature verification.

Related Terms

You May Be Interested In These

What Are Black Start and Grid Resilience?

Cybersecurity Terms

17 November 2026

What Are Black Start and Grid Resilience?

Read More
What Is Data Loss Prevention (DLP)?

Cybersecurity Terms

17 November 2026

What Is Data Loss Prevention (DLP)?

Read More