-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Document --show-labels #14778
Copy link
Copy link
Closed
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.language/enIssues or PRs related to English languageIssues or PRs related to English languagelifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.Denotes an issue or PR that has aged beyond stale and will be auto-closed.priority/backlogHigher priority than priority/awaiting-more-evidence.Higher priority than priority/awaiting-more-evidence.
Description
What would you like to be added
Add --show-labels options as part of kubectl cheatsheet
Currently documentation has length way to find it out
# Show labels for all pods (or any other Kubernetes object that supports labelling) is # 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
Why is this needed
Quick reference to get to the Kubernetes object labels
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.language/enIssues or PRs related to English languageIssues or PRs related to English languagelifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.Denotes an issue or PR that has aged beyond stale and will be auto-closed.priority/backlogHigher priority than priority/awaiting-more-evidence.Higher priority than priority/awaiting-more-evidence.