Skip to content

Commit

Permalink
Illustrate negative-exists selector in cheat sheet (#12667)
Browse files Browse the repository at this point in the history
  • Loading branch information
sftim authored and k8s-ci-robot committed Feb 17, 2019
1 parent ba42c93 commit 64fc415
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 64fc415

Please sign in to comment.