DZone
Once you start managing more than one Kubernetes cluster, you’ll start to demand more from your $KUBECONFIG
. Early on in my career spinning pods, I kept a separate .kubeconfig
file for each cluster, and wrote a small shell function to set the requisite environment variables. To switch between clusters was as simple as:
Shell
x
1
→ k is buffalo-lab
2
kubernetes: buffalo-lab
3
(config): /Users/jhunt/.k/buffalo-lab
I did this because the “correct” command was too much to remember:
Source: DZone