Skip to content

Commit

Permalink
updated comments from review for --show-labels
Browse files Browse the repository at this point in the history
  • Loading branch information
dpandhi-git committed Jun 11, 2019
1 parent 214e500 commit cd3186a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions content/en/docs/reference/kubectl/cheatsheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,7 @@ 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

# Or this command can be used as well to get all the labels associated with pods
kubectl get pods --show-labels

# Check which nodes are ready
Expand Down

0 comments on commit cd3186a

Please sign in to comment.