<p>For example, I have three apps that I want to deploy, and a database as well. When running on a dev machine (<code>docker-for-desktop</code> context) or in an integration or test cluster, I would want to run 2 replicas of each app, plus have a SQL container that they all connect to. In staging or production, I want to be able to set the replicas as per traffic needs, and I want to connect to a different (external) SQL server.</p>

<p>I would then want those yaml files to be kept in source control, so depending on your env it uses the correct context and "creates" all of the yaml files. </p>

<p>Is this possible with contexts? Or is this a namespace problem? Or do I just need to have yaml files in separate folders (a <code>local</code> folder, a <code>staging</code> folder, a <code>production</code> folder) and have copies of the yaml files in each folder. Or maybe some other option?</p>

mherzig
<p>There are multiple options to maintain the same set of YAML files for different configurations, for example:</p>

<p><a href="https://helm.sh/" rel="nofollow noreferrer">Helm</a></p>

<p><a href="https://kustomize.io/" rel="nofollow noreferrer">Kustomize</a></p>

<p><a href="https://ksonnet.io/" rel="nofollow noreferrer">ksonnet</a></p>

<p>You can use these tools to keep only per environment configurations in a different files in git.</p>
