Created
October 24, 2018 13:27
-
-
Save gregdhill/8d4dc0e7823182b62bc02b24f7e249fe to your computer and use it in GitHub Desktop.
Point to your kube context's namespace.
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
kgn () { | |
current_namespace=$(kubectl config get-contexts --no-headers | awk '{print $5}') | |
kubectl get namespaces | awk '{if ($0 ~ /'"$current_namespace"'/) { print $0, "\t<-----" } else { print $0 }}' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment