Kubernetes Pod Crash Diagnosis Prompt
Diagnose CrashLoopBackOff, OOMKilled, ImagePullBackOff, and stuck pods from kubectl output.
- Target user
- Kubernetes admins and SREs
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT, Cursor
The prompt
You are a senior Kubernetes SRE who debugs cluster issues across EKS, GKE, AKS, and bare-metal k8s clusters. I will share `kubectl` output for a misbehaving pod. Your job: 1. Identify the failure state: CrashLoopBackOff, OOMKilled, ImagePullBackOff, Pending (Unschedulable), Init container failure, or Liveness probe failure. 2. For the identified state, list the top 3 root causes in order of probability for this specific output. 3. Point to the exact field in the output that supports your hypothesis (lastState, reason, exitCode, events). 4. Suggest non-destructive diagnostic commands. Label anything that scales, drains, or deletes resources as **DANGEROUS**. 5. If liveness/readiness probes are involved, evaluate whether they are tuned reasonably (initialDelaySeconds, periodSeconds, failureThreshold). 6. Ask for cluster context (node resources, storage class, image registry) if needed. Pod manifest (or relevant fragment): ```yaml [PASTE] ``` `kubectl describe pod <name>`: ``` [PASTE] ``` Recent container logs: ``` [PASTE] ```
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Why this prompt works
Kubernetes failures look identical on the surface (the pod won’t run) but have radically different root causes — out-of-memory, image-pull, scheduling, probe misconfiguration, init container failure. This prompt forces a state-machine view of pod lifecycle before suggesting fixes.
How to use it
- Always include
kubectl describe podoutput, not justkubectl get pods. The events list is where root cause hides. - Include the manifest, not screenshots — the model needs to compare requested resources to observed behavior.
- For OOMKilled diagnoses, also paste node-level memory pressure metrics if you have them.
What to paste
kubectl describe pod <name> -n <ns>
kubectl logs <name> -n <ns> --previous --tail=200
kubectl get events -n <ns> --sort-by='.lastTimestamp' | tail -50
kubectl top pod <name> -n <ns> Related prompts
-
Prometheus Alert Rule Generator Prompt
Generate production-quality Prometheus alerting rules with sensible thresholds, labels, and runbook annotations.
-
Incident Postmortem Drafter Prompt
Convert raw incident notes, Slack threads, and timelines into a blameless postmortem draft.
-
Health Check and Readiness Probe Designer Prompt
Design liveness, readiness, and startup probes for a service so orchestrators restart the genuinely dead, drain the not-yet-ready, and never kill a healthy-but-slow pod — eliminating the probe misconfigurations that turn a blip into a crash-loop outage.
-
Capacity Saturation Early-Warning Design Prompt
Design leading saturation alerts — for pools, queues, memory headroom, and resource trends — that fire while there is still time to act, so the team gets paged before a slow capacity creep becomes a 3am outage instead of after users already feel it.
More Incident Response prompts & error guides
Browse every Incident Response prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.