Troubleshooting: Start Here¶
Most incidents are solved faster by following the same steps every time than by guessing.
A repeatable method¶
- Define the symptom. What exactly is failing, for whom, and since when?
- Check what changed. Deployments, config, node upgrades and certificate expiry cause most outages.
- Walk the layers from the outside in: DNS, then Service, then endpoints, then Pod, then node.
- Gather evidence before you change anything: events, logs and describe output.
- Change one thing at a time, and note what you did.
The five commands I reach for first¶
kubectl get pods -A -o wide
kubectl describe pod <pod> -n <ns>
kubectl logs <pod> -n <ns> --previous
kubectl get events -n <ns> --sort-by=.lastTimestamp
kubectl debug -it <pod> -n <ns> --image=nicolaka/netshoot --target=<container>
describe and events explain most scheduling, image and probe failures. --previous shows the logs of the container that just crashed. kubectl debug attaches a temporary toolbox container to a live Pod.
Which page do I need?¶
| What you see | Go to |
|---|---|
Pending, ImagePullBackOff, CrashLoopBackOff, OOMKilled | Pod failures |
Node NotReady, pressure conditions | Nodes |
| Service unreachable, DNS errors, 502/503 | Services and DNS |
PVC Pending, volume mount errors | Storage |
| Just want the commands | Quick Reference |