Interview Security & DevSecOps

What is admission control in Kubernetes, and how do OPA Gatekeeper or Kyverno use it? [Intermediate]

Answer

Kubernetes admission control intercepts API requests before objects are persisted. OPA Gatekeeper and Kyverno use admission webhooks to validate or mutate resources so policies such as no privileged containers, required labels, allowed registries, and resource limits are enforced centrally.

Technical explanation

Admission control is powerful because it blocks bad configuration at the cluster API boundary.

Gatekeeper uses OPA/Rego with ConstraintTemplates and Constraints; Kyverno uses Kubernetes-native YAML policies.

Policies should be tested in audit mode before enforce mode to avoid breaking teams unexpectedly.

Hands-on example

Hands-on rollout: install Gatekeeper, deploy constraints in dry-run/audit mode for one week, review violations, fix common templates, then enforce restricted policies for production namespaces while allowing controlled exemptions for platform namespaces.

Preparing for an interview?

Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.

More Security & DevSecOps interview questions

← All Security & DevSecOps questions