Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

Find all pods that status is NotReady sort count jq cheatsheet

kubectl get pods -ojson -A | jq '.items | group_by(.spec.nodeName) | map({"nodeName": .[0].spec.nodeName, "count": length}) | sort_by(.count)'
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #Find #pods #status #NotReady #sort #count #jq #cheatsheet
ADD COMMENT
Topic
Name
6+2 =