Interview Prep/Kubernetes/Pod startup failures

A Deployment shows `READY 0/3` but `kubectl get pods` shows no Pods at all.

IntermediateTroubleshootingPod startup failures
Answer

Likely causes → Pods are being rejected at admission, so the ReplicaSet cannot create them: Pod Security Admission, a Kyverno/Gatekeeper policy, ResourceQuota, a missing ServiceAccount, or a failing webhook.

Diagnose →

kubectl describe deploy web | sed -n '/Conditions/,$p'
kubectl describe rs -l app=web | sed -n '/Events/,$p'
# e.g. Error creating: pods "web-5f..." is forbidden: violates PodSecurity "restricted:latest":
#      allowPrivilegeEscalation != false (container "app" must set securityContext.allowPrivilegeEscalation=false)

Fix → Fix whatever the ReplicaSet event says: add the required securityContext fields, create the ServiceAccount, raise quota, or fix the webhook. The ReplicaSet controller retries on its own.

Prevent → Run kubectl apply --dry-run=server in CI so admission rejections fail the pipeline instead of the rollout. Use PSA warn/audit labels before switching a namespace to enforce.

All Kubernetes questions Roadmap: Kubernetes core

More on Pod startup failures