<p>I have to deploy my application software which is a linux based package (.bin) file  on a VM instance. As per system requirements, it needs minimum 8vCPUs and 32GB RAM.</p>

<p>Now, i was wondering if it is possible to deploy this software over multiple containers that load share the CPU and RAM power in the kubernetes cluster, rather than installing the software on a single VM instance.</p>

<p>is it possible?</p>

<p>Yes, it's possible to achieve that.</p>

<p>You can start using docker compose to build your customs docker images and then build your applications quickly.</p>

<p>First, I'll show you my GitHub <code>docker-compose</code> <a href="https://github.com/hugolesta/multi-docker" rel="nofollow noreferrer">repo</a>, you can inspect the folders, they are separated by applications or servers, so, one <code>docker-compose.yml</code> build the app, only you must run a command <code>docker-compose up -d</code></p>

<p>if you need to create a custom image with docker you should use this docker command <code>docker build -t &lt;user_docker&gt;/&lt;image_name&gt; &lt;path_of_files&gt;</code> </p>

<p><code>&lt;user_docker&gt;</code> = your docker user</p>

<p><code>&lt;image_name&gt;</code> = the image name that you choose</p>

<p><code>&lt;path_of_files&gt;</code> = somelocal path, if you need to build in the same folder you should use . (dot) </p>

<p>So, after that, you can upload this image to Dockerhub using the following commands.</p>

<p>You must login with your credentials </p>

<pre><code>docker login
</code></pre>

<p>You can check your images using the following command</p>

<pre><code>docker images 
</code></pre>

<p>Upload the image to DockerHub registry</p>

<pre><code>docker push &lt;user_docker&gt;/&lt;image_name&gt;
</code></pre>

<p>Once the image was uploaded, you can use it in different projects, make sure to make the image lightweight and usefully </p>

<p>Second, I'll show a similar <a href="https://github.com/hugolesta/multi-k8s" rel="nofollow noreferrer">repo</a> but this one has a k8s configuration into the folder called k8s. This configuration was made for Google cloud but I think you can analyze it and learn how you can start in your new project.</p>

<p>The <code>Nginx</code> service was replaced by ingress service <code>ingress-service.yml</code> and <code>https certificate</code> was added <code>certificate.yml</code> and <code>issuer.yml</code> files</p>

<p>If you need dockerize dbs, make sure the db is lightweight, you need to make a persistent volume using <code>PersistentVolumeClaim</code> (database-persistent-volume-claim.yml file) or if you use larger data onit you must use a dedicated db server or some db service in the cloud.</p>

<p>I hope this information will be useful to you.</p>
