<p>I have a couple of tiny containers with a very small memory footprint and little traffic. I think it's overkill and too expensive to have a separate pod for each of them.</p>

<p>I currently deploy containers by simply pushing Docker images to the <em>OpenShift Online</em> Container Registry. OpenShift rebuilds and deploys the application as soon as a new image arrives. It works fine, but I just can't find a way to make OpenShift accept multiple images/containers for the same application/pod.</p>

<p>Does anyone know how to run multiple containers in one application/pod?</p>

<p>I don't know what kind of disadvantages you have in mind when creating multiple pods. The overhead of a Pod vs a Container is negligible.</p>

<p>But putting multiple applications into a single pod clearly has disadvantages:</p>

<ul>
<li>if you want to restart a single container, you need to restart all of them</li>
<li>you cannot scale the containers separately, so you could not have a different count of services (for HA or load distribution)</li>
<li>you have to identify the services by port, since the service discovery works per Pod

<ul>
<li>ie. having multiple HTTP services, you could map them all to port 80 and use <code>http://fooservice</code> and <code>http://barservice</code> instead of <code>http://uberpod:8001</code> and <code>http://uberpod:8002</code></li>
</ul></li>
</ul>

<p>Again, there is almost no overhead of having multiple Pods.</p>

<p>I have no idea how the Kubernetes integration in OpenShift works, but with plain Kubernetes YAML files you could just add another container to the container list:</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: myapp-pod
  labels:
    app: myapp
spec:
  containers:
  - name: foo
    image: busybox
    command: ['sh', '-c', 'echo Hello Kubernetes! &amp;&amp; sleep 3600']
  - name: bar
    image: mycontainer:latest
</code></pre>
