<p>I'm quite new to the kubernetes and just wondering about several things.</p>

<p>Consider I have two repositories (front-e, backe-e). Each of them builds into the docker image. </p>

<p>I want to manage these two images with the kubernetes and run them inside the cluster. </p>

<p>What is the best practice to store deployments *.yml files in such a case? The separate repo? </p>

<p>IMHO the best practice for this is <a href="https://helm.sh/" rel="nofollow noreferrer">helm</a>, the Kubernetes, package manager. In short, it allows you to use k8s manifests, such as deployment, service, persistence, etc., with the option to parameterize these with variables.</p>

<p>You ask if it is better to keep these files in-repo or outside. Both ways have their pros and cons.</p>

<h3>the helm way</h3>

<p>When using helm, the best practice is to make a separate repo for only the helm charts (chart = kubernetes package). The advantage is here that you can build your central repository, where all your "packages" are collected including their version history.</p>

<h3>in-repo</h3>

<p>This makes the work for other developers easier, as everything related to your project, is in its repository.</p>

<h3>no helm, just the yaml files</h3>

<p>You just can use the raw manifests, which is much easier and also has fewer options. My personal best practice here is: placing pure config files in-repo, until I push it to the helm level, and place it in a central chart.</p>
