Skip to content

Instantly share code, notes, and snippets.

@erikh
Created August 16, 2020 23:37
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 erikh/5b4b968f279cf7287b4b49e039e6e0b9 to your computer and use it in GitHub Desktop.
Save erikh/5b4b968f279cf7287b4b49e039e6e0b9 to your computer and use it in GitHub Desktop.
if [ -x "$(which kubectl)" ] && [ -d ~/.kube ]
then
## usage: k <config file> <kubectl command>
## config file must exist in ~/.kube
k() {
config=$1
shift
KUBECONFIG=~/.kube/${config} kubectl "$@"
}
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment