update cheat sheet (#15677)

add sort by capacity
This commit is contained in:
Melony QIN
2019-08-06 04:11:53 +01:00
committed by Kubernetes Prow Robot
parent 97297af5ef
commit a17f259b8d
@@ -158,6 +158,10 @@ kubectl get services --sort-by=.metadata.name # List Services Sorted by Name
# List pods Sorted by Restart Count
kubectl get pods --sort-by='.status.containerStatuses[0].restartCount'
# List pods in test namespace sorted by capacity
kubectl get pods -n test --sort-by=.spec.capacity.storage
# Get the version label of all pods with label app=cassandra
kubectl get pods --selector=app=cassandra -o \
jsonpath='{.items[*].metadata.labels.version}'