Created
June 25, 2024 18:38
-
-
Save hbasria/4d64142a1732e9955d9b3e83379e5b12 to your computer and use it in GitHub Desktop.
kubectl switch namespace and context
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
$ alias kubens='kubectl config set-context --current --namespace ' | |
$ alias kubectx='kubectl config use-context ' | |
// Usage | |
$ kubens kube-system //Switch to a different namespace | |
$ kubectx docker //Switch to separate context |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment