kubectl get pods –all-namespaces –field-selector=status.phase!=Running works for a quick check, but for ongoing detection, alert on the kube_pod_container_status_restarts_total Prometheus metric rate rather than polling manually.
Next step
Once alerted, kubectl logs –previous on the crashed container almost always shows the actual failure reason faster than describing the pod.
Leave a Reply