Skip to content

Instantly share code, notes, and snippets.

@erikh
Created August 16, 2020 23:37
Embed
What would you like to do?
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