Interview Prep/DevSecOps/Kubernetes admission control and Pod Security

Pods do not appear, but `kubectl apply` of the Deployment succeeded

BeginnerTroubleshootingKubernetes admission control and Pod Security
Answer

Likely causes → Admission policies checked the Pod (created by the ReplicaSet controller), not the Deployment, so the rejection is recorded on the ReplicaSet, not shown to you.

Diagnose →

kubectl describe rs -l app=api | grep -A5 Events
kubectl get events -n prod --field-selector reason=FailedCreate

Look for admission webhook ... denied the request or violates PodSecurity.

Fix → Fix the pod template as the message says.

Prevent → Kyverno auto-generates rules for controllers (autogen); for Gatekeeper and PSA, validate workloads in CI too.

All DevSecOps questions Roadmap: Policy as code

More on Kubernetes admission control and Pod Security