Dec 1, live webinar: Agents in production, live: who gives the agent production access?

OPA Gatekeeper vs Kyverno vs a Managed Platform Layer: Where Should Deployment Policy Live?

OPA Gatekeeper and Kyverno enforce deployment policy at the Kubernetes admission controller, after a bad config has already been written. A managed platform layer enforces it before the config exists. Here is how the two layers compare, where Crossplane, Backstage, Port and Argo CD actually fit, and which one to start with.

Romaric Philogene
CEO & Co-founder
Published · 8 min
OPA Gatekeeper vs Kyverno vs a Managed Platform Layer: Where Should Deployment Policy Live?

Key Points

  • OPA Gatekeeper and Kyverno are Kubernetes admission controllers. They evaluate API server create and update requests through a validating webhook and reject non-compliant resources, which means a developer already wrote, committed, pushed and merged the bad config before the feedback arrives.
  • A managed platform layer enforces policy by construction. An internal developer platform such as Qovery, or Port and Backstage plus pipelines you build yourself, generates the manifests, so privileged pods, missing resource limits, unapproved registries and deploys to the wrong cloud account are never authored in the first place.
  • Gatekeeper and Kyverno cannot enforce anything outside the Kubernetes API server. Cloud IAM, which AWS, GCP, Azure or Scaleway account an environment lands in, managed database backup settings, and who may deploy to production are all out of scope for an admission webhook.
  • Choose OPA Gatekeeper if you need Rego and one policy language across Kubernetes, Terraform, CI and service authorization. Choose Kyverno if you are Kubernetes-only and want YAML policies with no Rego learning curve. Both are CNCF graduated projects and both run as admission webhooks with an audit-first mode.
  • The stack most mature teams converge on uses all the layers: a platform layer for golden paths, Kyverno or Gatekeeper as the cluster-wide backstop, Argo CD for delivery, and OPA in CI for Terraform plans. A platform layer does not replace an admission controller, and an admission controller does not create a golden path.

OPA Gatekeeper vs Kyverno vs a managed platform layer: which should enforce deployment policy?

Run two layers, because they enforce at different moments in the lifecycle. A managed platform layer enforces by construction, meaning developers can only produce compliant config because the platform generates it, while OPA Gatekeeper and Kyverno enforce by rejection at the Kubernetes admission controller, the last possible moment before a resource is persisted. If you can only deploy one layer this quarter, pick by failure mode: an admission controller when your risk is unknown config reaching the cluster from any source, a platform layer when your risk is developers hand-writing YAML they do not fully understand.

Qovery · Agentic DevOps platform
A control plane for platform teams and their coding agents
Learn more

Four terms, one sentence each. OPA (Open Policy Agent) is a general-purpose policy engine that evaluates rules written in the Rego language. OPA Gatekeeper is a Kubernetes validating and mutating admission webhook that runs OPA plus the Constraint Framework. Kyverno is a Kubernetes-native admission webhook whose policies are written in plain YAML. A managed platform layer is the system that generates deployment config from templates and owns an opinionated deploy API.

Here is where each layer sits in the lifecycle. A platform layer acts at generation, OPA in CI acts at the pull request, Argo CD acts at sync, and Gatekeeper or Kyverno act at admission.

Enforcement momentWho owns itWhat it can stop
Template / generationPlatform layer (Qovery, Backstage scaffolder, your own templates)The violation is never written: no privileged pods, no missing limits, no unapproved registry
Pull request / CIOPA, conftest, gator, kyverno CLIBad Terraform plans and manifests fail the build before merge
GitOps syncArgo CD AppProjects and RBACWho may sync what, and drift from Git
Admission webhookOPA Gatekeeper, Kyverno, Pod Security AdmissionAny non-compliant resource reaching the API server, from any source
RuntimeFalco, Kubernetes RBAC, runtime security toolsBehavior after the pod is already running

I want to be clear up front: this is not an argument against OPA Gatekeeper or Kyverno. Both are excellent, both are CNCF graduated projects, and you should keep one of them running. The honest point is narrower. Admission control is a backstop, not a developer experience. A rejection is feedback that arrives after the work is already done and after the pull request has been reviewed. A platform layer removes that feedback loop for a whole class of policy by never letting the violation be authored. The verdict for most teams is "use both", and the rest of this article is about which to start with.

What does OPA Gatekeeper actually enforce, and where does it stop?

OPA Gatekeeper enforces policy on Kubernetes API server requests and nothing else. It intercepts create, update and optionally delete calls through a validating admission webhook, evaluates Rego constraints defined as ConstraintTemplate and Constraint custom resources, and admits or rejects the request. Terraform plans, CI pipelines, cloud IAM, managed database settings and which cloud account an environment lands in are all outside its reach unless you run OPA separately in those places.

The mechanics are worth stating precisely. You write a ConstraintTemplate (the Rego logic plus a schema), then instantiate it with one or more Constraint resources that target specific kinds. An audit controller continuously re-evaluates resources that already exist in the cluster, so you find violations that predate the policy. The enforcementAction field takes deny, dryrun or warn, with deny as the default.

The real strengths are hard to replicate elsewhere. You get a cluster-wide guarantee regardless of who applied the manifest, whether that was kubectl, Helm, Argo CD or a forgotten CI job. You get continuous audit of existing resources, mutation to inject safe defaults, and the gator CLI to test constraints in CI before they ever reach a cluster.

The limits are just as real. Rego has a learning curve. The webhook adds latency and an availability dependency. There is no native enforcement of cloud resources. And policy sprawl sets in once you operate many clusters. The availability point deserves a number: the Kubernetes admission webhook default timeoutSeconds is 10, and with failurePolicy: Fail the API server rejects requests when the webhook is unreachable. An unhealthy webhook pod can become a cluster nobody can deploy to.

Why did so many teams end up here at all? PodSecurityPolicy was deprecated in Kubernetes v1.21 and removed in v1.25, which shipped in August 2022. That removal pushed teams toward Pod Security Admission, Gatekeeper or Kyverno. The single strongest reason to pick OPA over Kyverno is reach beyond Kubernetes: the same engine and language evaluate Terraform plans, act as an Envoy external authorization server, run CI checks, and answer authorization questions from your own application APIs.

How is Kyverno different from OPA Gatekeeper for Kubernetes policy?

Kyverno writes policies as Kubernetes YAML resources and is Kubernetes-only by design, so a small platform team can ship useful policies in a day without learning a new language. OPA Gatekeeper writes policies in Rego, which takes longer to learn but lets you reuse one engine across Kubernetes, Terraform plans, CI and service authorization. Both are CNCF graduated projects, both run as admission webhooks, and both support an audit-first rollout before you block anything.

Kyverno has capabilities with no direct Gatekeeper equivalent. Its generate rules auto-create resources such as NetworkPolicies, ResourceQuotas and Secrets in every new namespace, and its verifyImages rules check container image signatures through Sigstore and cosign. Gatekeeper's answers are the Constraint Framework, the gator CLI for shift-left testing, a large library of prebuilt constraint templates, and Rego reuse outside the cluster.

On rollout controls, both stage safely. Gatekeeper uses enforcementAction values of deny, dryrun or warn. Kyverno uses a failureAction of Audit or Enforce (set per validate rule as of Kyverno v1.13; the older top-level validationFailureAction field is deprecated).

OPA GatekeeperKyverno
Policy languageRego (ConstraintTemplate + Constraint)YAML, Kubernetes-native
ScopeKubernetes plus Terraform, CI, Envoy, app APIs (via OPA)Kubernetes only
ValidationYesYes
MutationYesYes
Resource generationNo native equivalentYes (generate rules)
Image signature verificationNot built inYes (verifyImages, Sigstore/cosign)
Shift-left CLIgatorkyverno CLI (test, apply)
Audit-mode flagenforcementAction: dryrunfailureAction: Audit
Learning curveHigher (Rego)Lower (YAML)
CNCF maturityOPA graduated Feb 2021Graduated Mar 2026
GitHub stars (Oct 2026)~4.3k (gatekeeper)~8.2k

A selection rule you can quote: if a security or policy team already writes Rego, pick Gatekeeper; if a one-to-three-person platform team owns Kubernetes and nothing else, pick Kyverno.

Do Crossplane, Backstage, Port, or Argo CD enforce deployment policy?

None of these four is a policy engine, and treating one as a substitute for an admission controller is the most common architectural mistake in this space. Crossplane constrains the shape of infrastructure that can be provisioned, Backstage and Port constrain what a developer can request, and Argo CD constrains how a change reaches the cluster. The allow-or-deny decision on an individual Kubernetes resource still needs an admission controller, or a platform that owns manifest generation outright.

Crossplane exposes Compositions and CompositeResourceDefinitions as guardrails on the API surface for cloud resources. That is policy by what you choose to expose, not policy by evaluation. Crossplane graduated in the CNCF in late 2025, and most Crossplane users still run Gatekeeper or Kyverno on the control plane cluster itself.

Backstage is a developer portal and software catalog donated to the CNCF by Spotify in 2020, incubating since March 2022. Its scaffolder templates create golden paths at project creation time, but Backstage enforces nothing at deploy time, and it is a framework your team builds, hosts and maintains. The DIY cost is real and ongoing: building and maintaining plugins, templates and the portal itself is a standing engineering investment, not a one-time install.

Port is a hosted internal developer portal with self-service actions and scorecards. Scorecards measure and nudge compliance; the actual execution is delegated to your own pipelines, which is exactly where enforcement still has to be implemented.

Argo CD guarantees the cluster matches Git and controls who may sync what through AppProjects and RBAC (Argo graduated in the CNCF in December 2022). That is a delivery guarantee, not a content guarantee. A perfectly compliant sync of a non-compliant manifest still ships the violation.

Worth naming as the free floor beneath all of this: Kubernetes Pod Security Admission, stable and enabled by default since v1.25. It applies the Pod Security Standards privileged, baseline and restricted profiles at the namespace level, and it covers nothing else. The gap every tool above shares is the same: a human still authors the Kubernetes or Terraform config, so you still need either rejection at admission or generation by a platform.

Ship faster on infrastructure you control.
Qovery gives your team self-service deployments on your own AWS, GCP, Azure, or Scaleway account - or your existing Kubernetes cluster. Start deploying in under 10 minutes.

What can a managed platform layer enforce that an admission controller cannot?

A managed platform layer enforces policy before any config exists, and it enforces past the cluster boundary. Because it owns manifest generation, cluster lifecycle, environment topology, RBAC scoping and cloud resource provisioning, violations such as privileged: true, missing resource limits, an unapproved image registry, or a production deploy by the wrong team become structurally unavailable rather than merely rejected. An admission controller can only say no to something a human already wrote, inside one cluster.

Policy by construction is the whole idea. If the platform generates the Deployment, nobody sets privileged: true, nobody forgets CPU and memory limits, and nobody pulls from an unapproved registry, because no human is hand-authoring the field that would carry the violation. The compliant path is the default path, so developers never see a rejection for the classes of policy the platform owns. That matters because deployment friction is expensive: in the Stack Overflow 2024 Developer Survey, more than 60% of developers reported losing 30 or more minutes a day just searching for answers, and complex build and deploy toolchains ranked among the top frustrations.

The scope also reaches past the Kubernetes API server, which is the part admission control structurally cannot touch: which cloud account and region an environment lands in, who can deploy to production, which database engine and backup policy is used, and auto-stop rules for non-production environments.

This is the one place Qovery belongs in this article. Qovery is a cloud-agnostic, Kubernetes-native internal developer platform that runs inside your own AWS, GCP, Azure or Scaleway account, or on your existing Kubernetes cluster, so the cloud bill, any Savings Plans or committed-use discounts, and your data stay in your name (BYOC). The capabilities that do the enforcing are concrete: git-push deployments, preview and ephemeral environments per pull request, environment auto-stop for non-production, managed cluster upgrades, per-environment RBAC, and databases backed by managed cloud services. Qovery does not ship a Rego engine, an admission controller, or custom policy CRDs, and it does not pretend to. It enforces by owning generation, which is a different layer entirely.

Be fair about the trade-off. A platform layer is opinionated, highly bespoke workloads will hit its edges, and anything deployed outside the platform is unenforced. That last point is precisely why you keep Kyverno or Gatekeeper running as the cluster-wide backstop. Here is the comparison that matters most, read any cell on its own and it should still be true.

LayerWhere enforcement happensWhat it can blockWhen the developer gets feedbackCovers cloud resources outside the cluster?Who builds and maintains itPolicy language
OPA GatekeeperAdmission webhookAny non-compliant K8s resource, from any sourceAfter commit, push, merge: at deployNoYou (self-hosted)Rego
KyvernoAdmission webhookAny non-compliant K8s resource, from any sourceAfter commit, push, merge: at deployNoYou (self-hosted)YAML
CrossplaneProvisioning API surfaceInfra shapes you did not exposeAt provision timeYes, for what you modeledYou (compositions)YAML/CRDs
Backstage / PortRequest / scaffold timeWhat a developer can request or scaffoldAt project creation, not deployOnly if your pipelines doYou (Backstage) / vendor-hosted (Port)Templates + your pipelines
Argo CDGitOps syncWho syncs what, drift from GitAt syncNoYou (self-hosted)AppProjects / RBAC
QoveryManifest generationViolations are never authored: privileged pods, missing limits, wrong account, prod by wrong teamBefore the config existsYes (account, region, RBAC, DB, auto-stop)Managed platformOpinionated deploy API (no policy DSL)

The hybrid architecture most mature teams converge on is short: a platform layer for golden paths, Kyverno or Gatekeeper for the cluster-wide guarantee, Argo CD for delivery, and OPA in CI for Terraform plans.

How do you roll policy enforcement out across many teams without blocking everyone?

Run audit mode first, publish the violation inventory, ship the compliant default path, then flip policies to deny one at a time. Policy enforcement without a golden path does not create compliance. It moves unplanned work onto developers who never asked for it, and the rejection rate becomes the metric that tells you the golden path is missing.

  1. Inventory before you block. Run Gatekeeper with enforcementAction: dryrun or Kyverno in Audit, and publish the violation count per team before enforcing anything.
  2. Test policies in CI. Surface failures in pull requests instead of at deploy time, using the gator CLI for Gatekeeper or the kyverno CLI test command for Kyverno.
  3. Ship the compliant path on the same day you announce the policy. Publish the template or platform path first, never after you start rejecting.
  4. Make exemptions explicit. Scope them per namespace with an owner and an expiry date, rather than hiding them behind a blanket failurePolicy: Ignore.
  5. Measure the right things. Track violation count, time to first successful deploy for a new service, and the developer rejection rate. A rising rejection rate means the golden path is wrong, not that developers are careless.

Two cautions carry real weight. First, the webhook availability trap: a default timeoutSeconds of 10, plus failurePolicy: Fail, plus an unhealthy webhook pod equals a cluster nobody can deploy to, per the Kubernetes Dynamic Admission Control docs. Second, missing resource limits and over-permissive security contexts are the two violations that dominate every audit inventory I have seen; independent benchmarks keep finding large shares of containers running as root and without CPU or memory limits set (the Sysdig 2022 Cloud-Native Security and Usage Report found a majority of containers had no CPU limits and most ran as root). In Red Hat's 2024 State of Kubernetes Security report, misconfiguration remained one of the most-cited sources of risk, with roughly 4 in 10 organizations detecting a misconfiguration in the prior year.

Which policy enforcement stack should your team choose in 2026?

Pick by what you are actually protecting against and by how many platform engineers you have, not by GitHub stars. The default for a team starting from zero today is Kyverno in audit mode plus a golden path that generates compliant config, with Gatekeeper reserved for teams that already need Rego outside Kubernetes. Four profiles cover most situations.

Team profileRecommended stackSetup effortPrimary risk it leaves open
Regulated org with a security/policy team, Terraform + CI needsOPA and Gatekeeper everywhere, one language across domains, gator in CIHigh (Rego skills, multi-domain)Developer experience: rejection is still the feedback
Kubernetes-only platform team of 1-3 engineersKyverno (Audit then Enforce) plus Argo CD, skip RegoLow to mediumNothing outside the cluster is covered
Many product teams, few platform engineersA managed platform layer such as Qovery (or Port/Backstage plus your own pipelines), with Kyverno as the cluster backstopLow with a managed platform, high if you build itBespoke workloads hit the platform's edges
Heavy multi-cloud infra provisioningCrossplane Compositions for the API surface, plus Gatekeeper on the control plane clusterHighCompositions constrain shape, not individual resource content

Platform teams are now the norm, not the exception. Gartner has projected that by 2026, 80% of large software engineering organizations will have platform engineering teams, up from 45% in 2022, and the DORA 2024 State of DevOps report found 89% of respondents using an internal developer platform (while also warning that platforms go through a J-curve dip before they pay off, which is exactly why the golden path has to come with the policy). With 82% of container users now running Kubernetes in production per the 2025 CNCF Annual Survey, the question is no longer whether to govern Kubernetes but at which layer.

If you are starting from zero today, the one-line answer is this: run Kyverno in audit mode as your cluster backstop, and put a platform layer in front of it so compliant config is the only config your developers can produce. That gives you the guarantee and the golden path at once.

If you want the golden path without building and maintaining it yourself, that is what we built Qovery for.

Frequently asked questions
Is OPA Gatekeeper better than a managed platform layer for enforcing deployment policy?

Neither is better; they enforce at different moments. OPA Gatekeeper is a Kubernetes admission controller that rejects non-compliant resources after a developer has already written them, which makes it a reliable cluster-wide backstop. A managed platform layer such as Qovery enforces by generating the config, so the violation is never authored and never reaches the cluster. Most mature teams run both: the platform for the golden path, Gatekeeper or Kyverno as the guarantee.

Can an internal developer platform replace OPA Gatekeeper or Kyverno?

No, and you should not try to make it. An internal developer platform such as Qovery enforces policy by generating manifests, which covers everything deployed through the platform, but anything applied directly with kubectl, Helm or a stray CI job bypasses it. OPA Gatekeeper and Kyverno sit at the Kubernetes admission controller and catch non-compliant resources from any source. Keep one admission controller running as the cluster-wide backstop underneath the platform.

What is the difference between OPA, OPA Gatekeeper, and Kyverno?

OPA (Open Policy Agent) is a general-purpose policy engine that evaluates rules written in Rego and runs anywhere, including Kubernetes, Terraform, CI and application authorization. OPA Gatekeeper is the Kubernetes-specific packaging of OPA as a validating and mutating admission webhook with the Constraint Framework. Kyverno is a separate CNCF graduated project that is a Kubernetes-only admission webhook whose policies are written in YAML rather than Rego.

Do Backstage, Port, or Crossplane enforce deployment policy?

No, none of them is a policy engine. Backstage and Port are internal developer portals that constrain what a developer can request or scaffold, but they enforce nothing at deploy time unless the pipelines behind them do. Crossplane constrains the shape of cloud infrastructure you expose through Compositions, which is a guardrail on the API surface rather than per-resource evaluation. For an allow-or-deny decision on a Kubernetes resource you still need OPA Gatekeeper, Kyverno, or a platform that owns manifest generation.

Does Argo CD enforce policy, or do I still need an admission controller?

Argo CD enforces a delivery guarantee, not a content guarantee, so you still need an admission controller. Argo CD makes the cluster match Git and controls who may sync what through AppProjects and RBAC, but a compliant sync of a non-compliant manifest still ships the violation. Pair Argo CD with OPA Gatekeeper or Kyverno at admission, and ideally with a platform layer that generates compliant manifests in the first place.

Can OPA Gatekeeper enforce policy on cloud resources outside Kubernetes?

OPA Gatekeeper itself cannot; it only evaluates Kubernetes API server requests. The underlying engine, OPA, can evaluate Terraform plans, act as an Envoy authorization server, and run in CI, but you deploy and operate those integrations separately from Gatekeeper. For cloud-level controls such as which account an environment lands in, IAM, or database backup policy, you need cloud guardrails (Crossplane, Terraform policy, cloud-native controls) or a platform layer that provisions those resources itself.

How does Qovery enforce deployment policy across teams and clouds?

Qovery enforces deployment policy by construction: it generates the manifests and owns the deploy API, so privileged pods, missing resource limits, unapproved registries and deploys to the wrong account are never authored. It is cloud-agnostic and Kubernetes-native, running inside your own AWS, GCP, Azure or Scaleway account or your existing Kubernetes cluster (BYOC), which lets it govern things an admission controller cannot, such as which account and region an environment uses, per-environment RBAC, managed database backups, and auto-stop for non-production. Qovery does not ship an admission controller or a Rego engine, so you keep Kyverno or Gatekeeper running as the cluster-wide backstop alongside it.

Romaric Philogene
About the author
Romaric Philogene

Romaric founded Qovery to make Kubernetes accessible to every engineering team. He writes about platform strategy, developer experience, and the future of cloud infrastructure.

Next step

Ship faster on infrastructure you control.

Qovery gives your team self-service deployments on your own AWS, GCP, Azure, or Scaleway account - or your existing Kubernetes cluster. Start deploying in under 10 minutes.