<p>My project have 2 Yamls to create which create 2 PODS each.
Can we create a single POD with these yamls, without merging the yamls,  with 2 containers ?</p>

<p>Thanks</p>

Chandu
<p>Yes, you run multiple containers inside the single pod. In single YAML manifest, you can add your both containers spec and run it. </p>

<p>however, you cannot without merging YAML you can not run multiple containers inside one pod.</p>

<p>for single file example :</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: mc1
  spec:
    volumes:
    - name: html
      emptyDir: {}
    containers:
    - name: 1st
      image: nginx
      volumeMounts:
      - name: html
        mountPath: /usr/share/nginx/html
    - name: 2nd
      image: debian
      volumeMounts:
      - name: html
        mountPath: /html
      command: ["/bin/sh", "-c"]
      args:
        - while true; do
            date &gt;&gt; /html/index.html;
            sleep 1;
          done
</code></pre>

<p>more details you can also refer official document : <a href="https://kubernetes.io/docs/tasks/access-application-cluster/communicate-containers-same-pod-shared-volume/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/access-application-cluster/communicate-containers-same-pod-shared-volume/</a></p>
