describe or logs? Training Your First kubectl Decision
The hardest part of troubleshooting is not knowing commands — it is picking the right one first. A simple decision tree for Pod status under pressure.
Every Kubernetes course teaches kubectl describe and kubectl logs. Almost none drill when to use which — yet that is what breaks you in incidents and on CKAD/CKA tasks.
The decision tree
Pod status?
│
├─ Pending ──────────────► describe pod (FailedScheduling Events)
│ logs usually empty / error
│
├─ ContainerCreating ────► describe pod (FailedMount, sandbox errors)
│
├─ ImagePullBackOff ─────► describe pod (registry/tag/auth in Events)
│
├─ CrashLoopBackOff ─────► describe pod (exit code, probes, OOM)
│ then logs --previous
│
├─ Running but not Ready ► describe pod (readiness probe Events)
│ then logs (current container)
│
└─ Running and Ready ────► logs / exec (application-level issue)Why describe wins early
kubectl describe pod bundles:
- Status and conditions
- Container states and last termination reason
- Events (scheduler, kubelet, probe failures)
One command answers where in the lifecycle the failure lives.
When logs are first
Logs shine after the container has run at least once:
- CrashLoopBackOff →
kubectl logs <pod> --previousfor the crash you missed - Running app errors → current logs
- Init container failure →
kubectl logs <pod> -c <init-container-name>
logs on a Pending pod wastes seconds — there is no container output.
Trap answers examiners love
| Trap | Why it hurts |
|---|---|
| `kubectl delete pod` first | Controller recreates; root cause unchanged |
| `kubectl logs` on Pending | No logs exist |
| Restart kubelet immediately | App/config issue masked as infra |
| Scale Deployment to zero | Hides problem; does not fix it |
Decision Trainer grades these explicitly — best, acceptable, bad, dangerous.
Practice deliberately
Read the status line in scenario context, pick your first step, then compare to the debrief. Pod Debugging is free on k8s Flashcards — five minutes per session beats re-reading a command cheat sheet.
Related: CrashLoopBackOff guide · Pending pods