Troubleshooting Guide
Pod Stuck in CrashLoopBackOff
# Check pod logs
kubectl logs <pod-name> -n <namespace>
# Describe pod for events
kubectl describe pod <pod-name> -n <namespace>
# Common causes:
# - Missing environment variables
# - ConfigMap not mounted
# - Resource limits too low
Node Not Ready
# List nodes and status
kubectl get nodes
# Describe the node
kubectl describe node <node-name>
# Check node conditions
kubectl get nodes -o json | jq '.items[].status.conditions'
High Latency
- Check application metrics in Grafana
- Check database query performance
- Verify pod resource limits
- Check for network bottlenecks
- Review recent deployments
Common Commands
| Problem |
Command |
| Pod crash |
kubectl logs --previous <pod> |
| Port forward |
kubectl port-forward pod/<pod> 8080:80 |
| Exec into pod |
kubectl exec -it <pod> -- /bin/sh |
| Get events |
kubectl get events --sort-by=.lastTimestamp |