Interview Prep/DevSecOps/Kubernetes Security

OPA Gatekeeper vs Kyverno: how do they differ?

IntermediateConceptKubernetes Security
Answer

Both are admission controllers with audit of existing resources. Gatekeeper uses Rego in ConstraintTemplates plus Constraint CRDs: very expressive, same language as OPA elsewhere (Conftest, API authz), but a learning curve. Kyverno writes policies as Kubernetes YAML (with CEL support in newer versions), and natively supports mutate, generate (e.g. default NetworkPolicy per namespace), cleanup and image signature verification.

We choose Kyverno when platform engineers own policy and want YAML and image verification out of the box; Gatekeeper when the organisation already standardises on Rego across Terraform, Kubernetes and APIs.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Kubernetes Security