Skip to content

Instantly share code, notes, and snippets.

@andrewwippler
Created April 10, 2018 12:30
Show Gist options
  • Save andrewwippler/1393e61fb2945f6b1a6c337802057050 to your computer and use it in GitHub Desktop.
Save andrewwippler/1393e61fb2945f6b1a6c337802057050 to your computer and use it in GitHub Desktop.
script to switch to a new kubernetes namespace.
#!/bin/bash
kubectl config set-context $(kubectl config current-context) --namespace=$1
# Run: /path/to/switch-k8s-namespace.sh something
# This prevents appending `-n something` to every kubectl command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment