<p>I have Kubernetes working well in two different environments, namely in my local environment (MacBook running minikube) and as well as on Google's Container Engine (GCE, Kubernetes on Google Cloud).  I use the MacBook/local environment to develop and test my YAML files and then, upon completion, try them on GCE.  </p>

<p>Currently I need to work with each environment individually:  I need to edit the YAML files in my local environment and, when ready, (git) clone them to a GCE environment and then use/deploy them.  This is a somewhat cumbersome process.</p>

<p>Ideally, I would like to use kubectl from my Macbook to easily switch between the local minikube or GCE Kubernetes environments and to easily determine where the YAML files are used. Is there a simple way to switch contexts to do this?</p>

<p>You can switch from local (minikube) to gcloud and back with:</p>

<p><code>kubectl config use-context CONTEXT_NAME</code></p>

<p>to list all contexts:</p>

<p><code>kubectl config get-contexts</code></p>

<p>You can create different enviroments for local and gcloud and put it in separate yaml files. </p>
