AdvancedLesson 33 of 35
Troubleshooting playbook
Map symptoms to causes.
Start with kubectl get pods, kubectl describe pod (read Events) and kubectl logs --previous.
- Pending: no node fits. Check requests, taints, node selectors, PVC binding.
- ImagePullBackOff / ErrImagePull: wrong image name or tag, or missing registry credentials.
- CrashLoopBackOff: the app exits. Read
logs --previousand the exit code. - OOMKilled: raise the memory limit or fix the leak.
- Running but no traffic: readiness failing, or the Service selector does not match pod labels (
kubectl get endpoints svc). - DNS issues: test from a debug pod.
bash
kubectl run tmp --rm -it --image=busybox:1.36 -- nslookup web
kubectl debug -it pod/web --image=busybox --target=web