Why is my pod restarting? 3 kubectl commands
Stop guessing why a pod keeps restarting. Three commands show the restart count, the reason and the logs from the crashed container.
Confirm the crash loop. A high RESTARTS count means the container keeps dying and Kubernetes keeps starting it again.
kubectl get podsFind the reason. Look under "Last State". OOMKilled with exit code 137 means the container ran out of memory; Error means the application itself exited.
kubectl describe pod <pod-name>Read the logs from the container that crashed. Plain kubectl logs shows the new container, which has not failed yet; --previous shows the one that did.
kubectl logs <pod-name> --previous
OOMKilled usually means the memory limit is too low for real traffic, or the application leaks memory. Measure with kubectl top pods before raising the limit.
Go deeper: 3 Kubernetes mistakes that crash your pods

