<p>I have a very simple docker-compose app with nginx and php-fpm services.</p>
<p>I would like to create a Helm chart that would deploy this exact same thing as a unit (a POD I guess?) but I would like to be able to scale the php-fpm service.</p>
<p>How can I achieve that?</p>
<p>My idea is to have these containers in a single deployment so I don't have a lot of deployments scattered.</p>
<p>i.e</p>
<pre><code>App1:
   - Container 1 (php-fpm autoscaled or manually scaled)
   - Container 2 (nginx)
   - Container 3 (Redis)
   - Container 4 (something else that this app needs)

App2
   - Container 1
   - Container 2
   - Container 3 etc...
</code></pre>
<p>I could do different deployments but then it would be like</p>
<pre><code>app1_php-fpm
app1_nginx
app1_redis
app2_container1
app2_container2
app2_container3
</code></pre>
<p>Instead of a single pod.</p>

JorgeeFG
<p>It's best practice to keep the single container inside the pod however we can run the multiple containers also.</p>
<p>Keep the <strong>Redis</strong> &amp; <strong>Nginx</strong> containers as separate deployment and you can add the HPA on that they can scale up and down based on load.</p>
<p>By keeping the deployment separate  would also help in doing any maintenance if required or deployment without downtime.</p>
<p>However, if you don't have an option to keep <strong>Nginx</strong> aside you can keep that also with <strong>fpm</strong> container as it's also a <strong>light weight</strong> container.</p>
<p>For example here I have one fpm and Nginx containers running inside single POD : <a href="https://github.com/harsh4870/Kubernetes-wordpress-php-fpm-nginx/blob/master/wordpress-deployment.yaml" rel="nofollow noreferrer">https://github.com/harsh4870/Kubernetes-wordpress-php-fpm-nginx/blob/master/wordpress-deployment.yaml</a></p>
<p>if possible divide all the applications as a single deployment so that it will be very easy to manage the deployments and maintenance and scaling also.</p>
