<p>currently i used docker-compose to arrange my application that consists of 3 dockerimages - a postgresql database and 2 wildfly application servers (Frontend-ui, backend).</p>

<p>My <strong>docker-compose.yml</strong> looks like this:</p>

<pre><code>version: '3.0'
services:
  my-webgui-service:
    image: test/mywebgui
    ports:
    - "18081:8080"
    links:
    - my-app-service
  my-app-service:
    image: test/myapp
    ports:
    - "18080:8080"
    - "29990:9990"
    links:
    - db-service
  db-service:
    image: test/postgres
    ports:
    - "15432:5432
</code></pre>

<p>Now, i would like to implement the same thing via kubernetes. </p>

<p>Is it possible to arrange this in a single yaml-File, that contains the configuration for service, deployment and pods?
I thought that it is easier to manage automated deployments when not having seperated yml-files.</p>

<p>Is this a best practise? </p>

<p>Best regards, Shane</p>

Shannon
<p>Yes it's possible, simply separate the different resources such as deployments, services, etc. with <code>---</code>. Concerning if it's a good practice or not: a matter of taste, rather. If you have all in one file it's more self-contained but for <code>kubectl apply -f</code> it doesn't really matter since it operates on directories as well.</p>
