Troubleshooting Workloads
Overview
Start with kubectl get pods to see status. CrashLoopBackOff means the container keeps exiting; Pending usually means it cannot be scheduled (resources or node selectors).
kubectl describe pod shows the Events section — the single most useful place to learn why something failed. kubectl logs (add --previous for a crashed container) shows application errors.
For deeper inspection, exec into a running pod, or use kubectl get events --sort-by=.lastTimestamp to see what is happening cluster-wide.
Cheatsheet
kubectl get podsCheck status (CrashLoopBackOff, Pending)kubectl describe pod <name>Read the Events sectionkubectl logs <pod> --previousLogs from the last crashed containerkubectl get events --sort-by=.lastTimestampRecent cluster eventskubectl top podLive CPU/memory per podTry it
A safe, simulated terminal. Run the suggested commands to see typical output.
Type a command and press Enter, or click a suggestion below to run it.
Quick quiz
1. What does CrashLoopBackOff indicate?
2. Which section of `kubectl describe pod` is most useful for diagnosing failures?