I am working with multiple Kubernetes clusters at Azure, so I need to change quickly from one cluster to another without having various files at my path C:\Users\username\.kube
, because I have to rename or replace the file when I wish to change to other.
I suggest that you use the following tools and tricks:
asdf
to manage multiple kubectl
versionsKUBECONFIG
env var to change between multiple kubeconfig
fileskube-ps1
to keep track of your current context/namespacekubectx
and kubens
to change fast between clusters/namespacesTake a look at this article, it explains how to accomplish this: Using different kubectl versions with multiple Kubernetes clusters
I also recommend this read: Mastering the KUBECONFIG file