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.
More on Kubernetes Security
What are the 4Cs of cloud native security?BeginnerWhat happens to a request between `kubectl apply` and etcd from a security point of view?IntermediateExplain Role, ClusterRole, RoleBinding and ClusterRoleBinding.BeginnerHow do you check what a user or service account is allowed to do?BeginnerWhich RBAC permissions are effectively cluster-admin in disguise?AdvancedHow do service account tokens work now, and what is `automountServiceAccountToken`?Intermediate