Last active
August 25, 2019 10:06
-
-
Save zeusbaba/7a2ec4b08d10d9eb671c1d10318f3892 to your computer and use it in GitHub Desktop.
shortcut kubectl for DO-kubeconfig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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