Last active
March 28, 2020 05:13
-
-
Save afirth/e859b649bb7b657f25eec3a9358f5627 to your computer and use it in GitHub Desktop.
jq for kubectl
This file contains 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
#name and status | |
k get zb -o json | jq -r '.items[] | [.metadata.name, .status.ready] | @tsv' | |
#get pods by label, show image and ready status | |
kgp --all-namespaces -l app.kubernetes.io/component=gateway -o json | jq -r '.items[] |[ .metadata.namespace, .status.containerStatuses[0].ready, .status.containerStatuses[0].image ] | @tsv' | grep alpha <<< |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment