<p>In my machine I have two <code>kubectl</code> users, my company's account and my personal account. I can confirm that by running <code>kubectl config view</code>.</p>

<p>I'm trying to access my company's cluster but <code>kubectl</code> is using to my personal credentials to authenticate. Which is causing an error, as expected.</p>

<p>How do I change to my company's account?</p>

<p>Users and clusters are tied to a context and you can change users and clusters by changing the context.</p>

<pre><code>kubectl config use-context my-context-name
</code></pre>

<p>Above command sets the current context to <code>my-context-name</code>.Now when kubectl is used the user and cluster tied to <code>my-context-name</code> context will be used.</p>

<p>Check the <a href="https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/" rel="nofollow noreferrer">docs</a> for more details and various other available options.</p>
