What is the best way to identify non ready pod in all name spaces? Also, is thei . . .

Swarnendu De:
What is the best way to identify non ready pod in all name spaces? Also, is their any recommendation on formatting part in vim editor?

unnivkn:
https://www.youtube.com/watch?v=knyJt8d6C_8

unnivkn:
@Swarnendu De Please try this:

##To print resources not in ready state:
kubectl get pod |grep -Pv ‘\s+([1-9]+)/\1\s+’
NAME READY STATUS RESTARTS AGE
app_3 0/1 Completed 0 77m
app_17 4/8 Running 0 77m

##To print resources in ready state:
kubectl get pod |grep -P ‘\s+([1-9]+)/\1\s+’
NAME READY STATUS RESTARTS AGE
app_1 1/1 Running 0 77m
app_2 1/1 Running 0 77m
app_4 1/1 Running 0 77m
app_5 8/8 Running 0 77m
app_6 4/4 Running 1 77m