Skip to content

Commit

Permalink
Added --show-labels as per #14778
Browse files Browse the repository at this point in the history
  • Loading branch information
dpandhi-git committed Jun 7, 2019
1 parent 3506671 commit fa7cd59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/en/docs/reference/kubectl/cheatsheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ echo $(kubectl get pods --selector=$sel --output=jsonpath={.items..metadata.name
# Show labels for all pods (or any other Kubernetes object that supports labelling)
# 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 pod --show-labels

# Check which nodes are ready
Expand Down

0 comments on commit fa7cd59

Please sign in to comment.