<p>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 <code>C:\Users\username\.kube</code>, because I have to rename or replace the file when I wish to change to other.</p>

kelgwiin
<p>I suggest that you use the following tools and tricks:</p>

<ul>
<li>Use <a href="https://github.com/asdf-vm/asdf" rel="noreferrer"><code>asdf</code></a> to manage multiple <code>kubectl</code> versions</li>
<li><strong><a href="https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/#set-the-kubeconfig-environment-variable" rel="noreferrer">Set the <code>KUBECONFIG</code></a> env var to change between multiple <code>kubeconfig</code> files</strong></li>
<li>Use <a href="https://github.com/jonmosco/kube-ps1" rel="noreferrer"><code>kube-ps1</code></a> to keep track of your current context/namespace</li>
<li>Use <a href="https://github.com/ahmetb/kubectx" rel="noreferrer"><code>kubectx</code> and <code>kubens</code></a> to change fast between clusters/namespaces</li>
<li>Use aliases to combine them all together</li>
</ul>

<p>Take a look at this article, it explains how to accomplish this: <a href="https://medium.com/@eduardobaitello/using-different-kubectl-versions-with-multiple-kubernetes-clusters-a3ad8707b87b" rel="noreferrer">Using different kubectl versions with multiple Kubernetes clusters</a></p>

<p>I also recommend this read: <a href="https://medium.com/@ahmetb/mastering-kubeconfig-4e447aa32c75" rel="noreferrer">Mastering the KUBECONFIG file</a></p>
