Debugging K8s issues is heavily tested in SRE interviews.
Key commands:
kubectl get pods -o wide # Pod status and node
kubectl describe pod <name> # Events and conditions
kubectl logs <pod> [-c container] # Container logs
kubectl exec -it <pod> -- sh # Shell into container
kubectl get events --sort-by='.lastTimestamp'
Common issues:
- ImagePullBackOff: Wrong image name or registry auth
- CrashLoopBackOff: App crashes on start (check logs)
- Pending: Insufficient resources or node selector mismatch
Interview question: "A pod is stuck in Pending. How do you debug it?"