kubectl get pods --all-namespaces
provides the list of all pods. The column RESTARTS
shows the number of restarts that a pod has had. How to get the list of all the pods that have had at least one restart? Thanks
kubectl get pods --all-namespaces | awk '$5>0'
or simply just
kubectl get po -A | awk '$5>0'
Use awk to print if column 5 (RESTARTS) > 0