Interview Prep/DevSecOps/Kubernetes admission control and Pod Security

Argo CD sync fails with `admission webhook "validate.kyverno.svc-fail" denied the request` only for the Job hook resource

IntermediateTroubleshootingKubernetes admission control and Pod Security
Answer

Likely causes → Argo CD hook Jobs (migrations) are created by a different template, without the hardened securityContext or required labels the policy expects.

Diagnose → Argo CD UI → sync result message; kubectl get events -n prod | grep -i denied.

Fix → Fix the hook Job template in the chart to meet policy. Do not add a blanket exclusion for Jobs.

Prevent → Render the whole chart, hooks included, and run kyverno apply in CI.

All DevSecOps questions Roadmap: Policy as code

More on Kubernetes admission control and Pod Security