<p>I am trying out mock exams on udemy and have created a multi container pod . but exam result says command is not set correctly on container <code>test2</code> .I am not able to identify the issue.</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: null
  labels:
    run: multi-pod
  name: multi-pod
spec:
  containers:
  - image: nginx
    name: test1
    env:
     - name: type
       value: demo1
  - image: busybox
    name: test2
    env:
     - name: type
        value: demo2
    command: [&quot;sleep&quot;, &quot;4800&quot;]
</code></pre>

coder25
<p>Your issue is with your <strong>YAML in line 19.</strong></p>
<p>Please keep in mind that <code>YAML</code> syntax is very sensitive for spaces and tabs.</p>
<p>Your issue:</p>
<pre><code>  - image: busybox
    name: test2
    env:
     - name: type
        value: demo2     ### Issue is in this line, you have one extra space
    command: [&quot;sleep&quot;, &quot;4800&quot;]
</code></pre>
<p><strong>Solution:</strong></p>
<p>Remove space, it wil looks like that:</p>
<pre><code>    env:
     - name: type
       value: demo2 
</code></pre>
<p>For validation of <code>YAML</code> you can use external validators like <a href="http://www.yamllint.com/" rel="nofollow noreferrer">yamllint</a>.</p>
<p>If you would paste your <code>YAML</code> to mentioned validator, you will receive error:</p>
<pre><code>(&lt;unknown&gt;): mapping values are not allowed in this context at line 19 column 14
</code></pre>
<p>After removing this extra space you will get</p>
<pre><code>Valid YAML!
</code></pre>
