<p>I'm using kubectl to control a local microk8s installation. I configured a local Google cloud shell connection in order to avoid the ridiculous provisioning of the machine available through the GKE dashboard.</p>

<p>Now, <code>kubectl</code> commands seem to be randomly executed on microk8s and GKE. I want not only to fix this, but prohibit this scenario for the future.</p>

<p>The possibility that <code>kubectl</code> can refer to different environment is a horrible idea apparently founded in concept of the <code>kubectl</code> CLI which provides no way to specify a remote cluster. It can lead to accidental changes on production systems. Even a hardcore 12-factor evangelist will have a local cluster installed for development.</p>

<p><code>kubectl config use-context</code> command can be used to modify, whom kubectl talks to.</p>

<blockquote>
  <p>configure access to multiple clusters by using configuration files. After your clusters, users, and contexts are defined in one or more configuration files, you can quickly switch between clusters by using the.
  <a href="https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/" rel="nofollow noreferrer">configure-access-multiple-clusters/</a></p>
</blockquote>
