<p>I am looking for a (more or less scientific) document/presentation that explains why the developers of the &quot;Kubernbetes language&quot; made the choice to fragment an application definition (for instance) in multiple yaml files instead of writing a single yaml file with all the details of the application deployment (all deployments, volumes, ...)?</p>
<p>I imagine that this has something to do with reusability, maintainability and readability but it would be nice to have a more structured argumentation (I think of a conference paper or presentation in a conference such as kubcon or dockercon)</p>
<p>Thanks,</p>
<p>Abdelghani</p>

<blockquote>
<p>why the developers of the &quot;Kubernbetes language&quot; made the choice to fragment an application definition (for instance) in multiple yaml files instead of writing a single yaml file with all the details of the application deployment (all deployments, volumes, ...)?</p>
</blockquote>
<p>This allows us to modify the configuration of Kubernetes objects easier. Thus, you do not have to go through the entire cluster configuration yaml file to make a small change in the service backend, for example. And yes, it is easier to develop and maintain a bunch of files, each containing some object or a group of related objects.</p>
<p>Keep in mind that you can call kubectl apply command on a directory of config files:</p>
<pre><code>kubectl apply -f &lt;directory&gt;
</code></pre>
<p><strong>Group related k8s objects into a single file whenever it makes sense</strong>. So, it is easier to manage.</p>
<p>But you definitely can put the entire cluster configuration in one yaml file using this syntax (note ---).</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: Service
metadata:
# skip

---
apiVersion: apps/v1
kind: Deployment
metadata:
# skip

</code></pre>
<p>Kubernetes developers suggest write your configuration files using YAML rather than JSON. Though these formats can be used interchangeably in almost all scenarios, YAML tends to be more user-friendly.</p>
<p>There is a good Kubernetes page on <a href="https://kubernetes.io/docs/concepts/configuration/overview/#general-configuration-tips" rel="nofollow noreferrer">Configuration Best Practices</a>.</p>
