Skip to content

Instantly share code, notes, and snippets.

@erkolson
Created November 2, 2017 14:51
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 erkolson/794766023711e3daa165c3b1ef154270 to your computer and use it in GitHub Desktop.
Save erkolson/794766023711e3daa165c3b1ef154270 to your computer and use it in GitHub Desktop.
ctx () {
context=$1
if [ -z "$context" ]
then
echo "USAGE: ctx <context-name>"
echo "Available contexts:"
kubectl config get-contexts
else
kubectl config use-context $context
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment