Created
November 29, 2020 15:32
-
-
Save Prajithp/90f293b91f5483d20ec2f1de7aa08938 to your computer and use it in GitHub Desktop.
kubectl eamples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kubectl get po --all-namespaces -o custom-columns=name:.metadata.name,status:.status.phase,image:'.spec.containers[0].image' | |
| kubectl get po -o json --all-namespaces | jq '.items | group_by(.spec.nodeName) | map({"nodeName": .[0].spec.nodeName, "count": length}) | sort_by(.count)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment