Created
May 1, 2019 16:47
-
-
Save mvisonneau/e4b42ac2a585d529bc3eebff6ac3c73b to your computer and use it in GitHub Desktop.
Figure out what is the current namespace configured within the current context using kubectl & jq
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
kubectl config view -o json | jq -r ".contexts[] | select( .name | contains(\"$(kubectl config current-context)\")) | .context.namespace" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment