Skip to main content
InterviewHubPRO
Section Overview
Q27

Question 27 of 50

Part 3: Enterprise Scale, Security & Edge GitOps (Senior / Staff)

54%
GitOps & ArgoCD (50 Qs)•Part 3: Enterprise Scale, Security & Edge GitOps (Senior / Staff)

How do you enforce Policy as Code with Kyverno or Gatekeeper in GitOps?

senior LevelSecurity & Auth

In Simple Words: GitOps ensures what is in Git gets deployed, but does not prevent a developer from committing an insecure manifest (e.g. running containers as root or missing CPU limits).

  • Shift-Left in CI: Run conftest or kyverno-cli test inside GitHub Actions to fail PRs that violate security policies before they are merged.
  • In-Cluster Admission Control: Kyverno or OPA Gatekeeper runs in Kubernetes and blocks non-compliant resources even if ArgoCD attempts to apply them.