Skip to content

Commit

Permalink
Illustrate negative-exists selector in cheat sheet (kubernetes#12667)
Browse files Browse the repository at this point in the history
  • Loading branch information
sftim authored and Mayank Kumar committed Mar 11, 2019
1 parent 2f7fcc6 commit 387c7a9
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 @@ -146,6 +146,10 @@ kubectl get pods --sort-by='.status.containerStatuses[0].restartCount'
kubectl get pods --selector=app=cassandra rc -o \
jsonpath='{.items[*].metadata.labels.version}'

# Get all worker nodes (use a selector to exclude results that have a label
# named 'node-role.kubernetes.io/master')
kubectl get node --selector='!node-role.kubernetes.io/master'

# Get all running pods in the namespace
kubectl get pods --field-selector=status.phase=Running

Expand Down

0 comments on commit 387c7a9

Please sign in to comment.