<p>In the pod creation yaml files or in the deployment yaml files in kubernetes, why Containers key has a list value <code>- name: memory-demo-ctr</code> rather than we can simply provide the map value <code>name: memory-demo-ctr</code> (why we're providing <code>-</code> symbol)?</p>

<p>I tried looking at over the web but couldn't find a solution.</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: memory-demo
  namespace: mem-example
spec:
  containers:
  - name: memory-demo-ctr
    image: polinux/stress
</code></pre>

Teja 
<p>Pod is capable of running multiple containers. That's the reason <code>containers</code> object is a list instead of map.</p>

<pre><code>kind: Pod
...
spec:
  containers:
  - name: busybox
    image: busybox:latest
  - name: nginx
    image: nginx:1.7.9
  - name: redis
    image: redis:latest
</code></pre>

<p>If <code>containers</code> is a map object, you cannot write a configuration file to run multiple containers inside a pod. I hope this answer solved your doubt.</p>
