<p>I would like to be able to test my docker application on local before sending it to the cluster. I want to use mini Kube for this. Meanwhile, instead of having multiple kube config files which would define env variables for the cloud environment and for my local machine, I would like to override some of the env variables when running in local. I can see that you can do something like that with docker compose: </p>

<pre><code>docker-compose up -f docker-compose.yml -f docker-compose.e2e.yml.
</code></pre>

<p>The second file would only have the overriding values. Yes, there are two files but I find it clean. </p>

<p>Is there a way to do something similar with Kube/minikube? Or even something better ???</p>

MaatDeamon
<p>I think you are asking how to pass different environment values into your Pods depending upon which environment they are deployed to. One pattern to achieve this is to deploy with <a href="https://helm.sh/" rel="nofollow noreferrer">helm</a>. Then you use templated versions of your kubernetes descriptors for deployment. You also have a values.yaml file that contains values to be injected into the descriptors. You can <a href="https://github.com/helm/helm/blob/master/docs/chart_template_guide/values_files.md#values-files" rel="nofollow noreferrer">switch and overlay values.yaml files</a> at the time of install to control which values are injected for a given installation.</p>

<p>If you are asking how to switch whether a <code>kubectl</code> command runs against local or cloud without having to keep switching your kubeconfig file then you can <a href="https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/" rel="nofollow noreferrer">add both contexts to your kubeconfig</a> and use <code>kubectl context</code> to switch between them, as @<a href="https://stackoverflow.com/users/4550110/ijaz-khan">Ijaz Khan</a> suggests</p>
