Skip to content

Instantly share code, notes, and snippets.

@dasMulli
Created February 25, 2020 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dasMulli/5d02af1ed8e4a4d770e230bbb5b0e9bf to your computer and use it in GitHub Desktop.
Save dasMulli/5d02af1ed8e4a4d770e230bbb5b0e9bf to your computer and use it in GitHub Desktop.
Kubernetes namespace switching utility for Windows
@echo off
if "%~1"=="" GOTO PRINTNAMESPACE
: SETNAMESPACE
kubectl config set-context --current --namespace="%~1"
: PRINTNAMESPACE
kubectl config view --minify --output "jsonpath={..namespace}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment