From a17f259b8d292bfa75e895b9a82348dca3ae645b Mon Sep 17 00:00:00 2001 From: Melony QIN Date: Tue, 6 Aug 2019 04:11:53 +0100 Subject: [PATCH] update cheat sheet (#15677) add sort by capacity --- content/en/docs/reference/kubectl/cheatsheet.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/en/docs/reference/kubectl/cheatsheet.md b/content/en/docs/reference/kubectl/cheatsheet.md index 19a0b78f4f..10e5b140ef 100644 --- a/content/en/docs/reference/kubectl/cheatsheet.md +++ b/content/en/docs/reference/kubectl/cheatsheet.md @@ -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}'