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.
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
- What is OPA, and what is the Rego language used for? [Intermediate]
- What is workload identity, and how does it remove static credentials? [Intermediate]
- How do you apply least privilege to service-to-service communication (e.g., with Istio mTLS)? [Intermediate]
- What is secrets management, and how does HashiCorp Vault work at a high level? [Intermediate]
- What is encryption at rest versus in transit, and how do you ensure both? [Advanced]
- What is the difference between symmetric and asymmetric encryption? [Advanced]
- What is certificate management, and how do tools like cert-manager help? [Advanced]
- What is the difference between authentication and authorization? [Advanced]