Level 2 answer: APPROVE. Deleting that prod pod was safe (with one trap)
Yesterday's level: your AI agent wanted to run kubectl delete pod api-7f9c -n prod on a CrashLoopBackOff pod owned by a 3-replica Deployment. Illustrative scenario.
The answer is APPROVE. Here is why, and the trap most people miss:
1. A pod owned by a Deployment is cattle. The ReplicaSet notices the missing replica and schedules a fresh pod within seconds. Nothing is lost that the pod spec doesn't recreate.
2. Two healthy replicas keep serving while it restarts, so users see nothing.
3. THE TRAP: a PodDisruptionBudget does NOT protect you here. A PDB only limits voluntary evictions through the Eviction API (kubectl drain, node upgrades). A plain kubectl delete pod bypasses it completely. If you were counting on the PDB, check the replica count yourself first: kubectl get deploy -n prod and look at READY.
4. When the answer flips to DENY: a bare pod with no controller, a StatefulSet pod with local state, or the last ready replica. Then deleting it is an outage or data loss.
5. A restart is not a fix. If the config reload is still bad, the new pod CrashLoops again. Let the agent read the logs (kubectl logs --previous), not just delete things.
Guardrail tip: give your agent a read-only kubeconfig and let deletes go through you. The Claude Code Infra Guardrails Lab in the Classroom has a tested hook that blocks kubectl delete and drain unless you approve.
Level 3 drops tomorrow: a Terraform plan that looks clean but isn't. Would you have approved this one? One word below.
0
0 comments
Richard Skacel
2
Level 2 answer: APPROVE. Deleting that prod pod was safe (with one trap)
powered by
AI for Cloud Engineers
skool.com/cloud-cost-optimization-3746
Claude Code & AI agents for cloud engineers. Automate AWS, Azure, GCP, K8s and Terraform without deleting prod. Free scripts, real labs.
Build your own community
Bring people together around your passion and get paid.
Powered by