<p>Below are the exact words of a question that came up in an online test.</p>
<blockquote>
<p>Create an single container app running in a pod named &quot;bla-bla&quot; with
any 3 of the four images listed below. Images: nginx + redis+
memcached.</p>
</blockquote>
<p>I'm not sure whether this is a wordplay or a typo but what I would like to know is whether there is any syntax for launching multiple images in a single container? I know this can be done by having multiple containers within a single pod but according to the wordings in the question, I don't think that is what they expect. I saw this same exact question in Kubernetes official forum but no answer there too. Hence posting it here so it can reach a wider audience.</p>
<p><strong>Forum Question:</strong> <a href="https://discuss.kubernetes.io/t/can-we-have-a-single-container-with-multiple-image-like-nginx-redis-alpine/12017" rel="nofollow noreferrer">https://discuss.kubernetes.io/t/can-we-have-a-single-container-with-multiple-image-like-nginx-redis-alpine/12017</a></p>

vishal
<p>I don't see the problem with the question. It asks to create a single <em>&quot;container app running in a pod&quot;</em>, not a <em>&quot;single container&quot;</em>.</p>
<p>So single pod with multiple containers is the answer. Here is the <a href="https://kubernetes.io/docs/tasks/access-application-cluster/communicate-containers-same-pod-shared-volume/" rel="nofollow noreferrer">example</a>.</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: two-containers
spec:

  restartPolicy: Never

  volumes:
  - name: shared-data
    emptyDir: {}

  containers:

  - name: nginx-container
    image: nginx
    volumeMounts:
    - name: shared-data
      mountPath: /usr/share/nginx/html

  - name: debian-container
    image: debian
    volumeMounts:
    - name: shared-data
      mountPath: /pod-data
    command: [&quot;/bin/sh&quot;]
    args: [&quot;-c&quot;, &quot;echo Hello from the debian container &gt; /pod-data/index.html&quot;]
</code></pre>
