Skip to content

Instantly share code, notes, and snippets.

@zeusbaba
Last active August 25, 2019 10:06
Show Gist options
  • Save zeusbaba/7a2ec4b08d10d9eb671c1d10318f3892 to your computer and use it in GitHub Desktop.
Save zeusbaba/7a2ec4b08d10d9eb671c1d10318f3892 to your computer and use it in GitHub Desktop.
shortcut kubectl for DO-kubeconfig
vim ~/.bash_profile
# put this in your bash_profile, NB! use your own path+name for your DO-kubeconfig file
export KUBECONFIG=/FIXME/kubeconfigs/petcat-k8s-kubeconfig.yaml
export kubectl="kubectl --kubeconfig=$KUBECONFIG"
# then run this to make it active
source bash_profile
# now you can start using kubectl with DO kubeconfig with this shotcut cmd
$kubectl
# get info, pods
$kubectl version --short
$kubectl cluster-info
$kubectl get pods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment