Illustrate negative-exists selector in cheat sheet (#12667)
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
ba42c9311d
commit
64fc415cdd
@@ -146,6 +146,10 @@ kubectl get pods --sort-by='.status.containerStatuses[0].restartCount'
|
|||||||
kubectl get pods --selector=app=cassandra rc -o \
|
kubectl get pods --selector=app=cassandra rc -o \
|
||||||
jsonpath='{.items[*].metadata.labels.version}'
|
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
|
# Get all running pods in the namespace
|
||||||
kubectl get pods --field-selector=status.phase=Running
|
kubectl get pods --field-selector=status.phase=Running
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user