Skip to content

Commit

Permalink
updated OR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dpandhi-git committed Jun 11, 2019
1 parent d028d87 commit 214e500
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions content/en/docs/reference/kubectl/cheatsheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ echo $(kubectl get pods --selector=$sel --output=jsonpath={.items..metadata.name
# Also uses "jq"
for item in $( kubectl get pod --output=name); do printf "Labels for %s\n" "$item" | grep --color -E '[^/]+$' && kubectl get "$item" --output=json | jq -r -S '.metadata.labels | to_entries | .[] | " \(.key)=\(.value)"' 2>/dev/null; printf "\n"; done

# OR

kubectl get pods --show-labels

# Check which nodes are ready
JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}' \
&& kubectl get nodes -o jsonpath="$JSONPATH" | grep "Ready=True"
Expand Down

0 comments on commit 214e500

Please sign in to comment.