<p>I am trying to deploy multiple pods in k8s like say MySQL, Mango, Redis etc</p>

<p>Can i create a single deployment resource for this and have multiple containers defined in template section? Is this allowed? If so, how will replication behave in this case?</p>

<p>Thanks
Pavan</p>

pa1
<blockquote>
  <p>I am trying to deploy multiple pods in k8s like say MySQL, Mango,
  Redis etc</p>
</blockquote>

<p>From <strong>microservices architecture</strong> perspective it is actually quite a bad idea to place all those containers in a single <strong>Pod</strong>. Keep in mind that a <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod/" rel="nofollow noreferrer"><strong>Pod</strong></a> is a smallest deployable unit that can be created and managed by <strong>Kubernetes</strong>. There are quite many good reasons you don't want to have all above mentioned services in a single <strong>Pod</strong>. Difficulties in scaling such solution is just one of them.</p>

<blockquote>
  <p>Can i create a single deployment resource for this and have multiple
  containers defined in template section? Is this allowed? If so, how
  will replication behave in this case?</p>
</blockquote>

<p>No, it is not allowed in Kubernetes. As to <a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/" rel="nofollow noreferrer"><strong>Deployments</strong></a> and <a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/" rel="nofollow noreferrer"><strong>StatefulSets</strong></a>, (which you need for statefull applications such as databases) both manage Pods that are based on identical container spec so it is not possible to have a <strong>Deployment</strong> or <strong>StatefulSet</strong> consisting of different types of Pods, based on different specs.</p>

<p>To sum up:
<em>Many Deployments and StatefulSets objects, serving for different purposes are the right solution.</em></p>
