<p><strong>This is my firstpod.yaml file:</strong></p>
<pre><code>apiVersion: v1
kind: Pod
metadata: 
 name: webapp
spec: 
 containers: 
 - name: webappcontainer 
   image: richardchesterwood/k8s-fleetman-webapp-angular:release0

   
</code></pre>
<p><strong>I'm getting following error:</strong></p>
<pre><code>error: error validating &quot;firstpod.yaml&quot;: error validating data: ValidationError(Pod.spec.containers[0]): invalid type for io.k8s.api.core.v1.Container: got &quot;string&quot;, expected &quot;map&quot;; if you choose to ignore these errors, turn validation off with --validate=false&quot;
</code></pre>
<p><strong>In OUTPUT format of  yaml file in online parser looks everything fine..you can see below to online parser output</strong></p>
<pre><code>{
  &quot;kind&quot;: &quot;Pod&quot;, 
  &quot;spec&quot;: {
    &quot;containers&quot;: [
      {
        &quot;image&quot;: &quot;richardchesterwood/k8s-fleetman-webapp-angular:release0&quot;, 
        &quot;name&quot;: &quot;webappcontainer&quot;
      }
    ]
  }, 
  &quot;apiVersion&quot;: &quot;v1&quot;, 
  &quot;metadata&quot;: {
    &quot;name&quot;: &quot;webapp&quot;
  }
}
</code></pre>
<p><a href="https://i.stack.imgur.com/gGbEd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gGbEd.png" alt="yaml file in notepad++ " /></a>
<a href="https://i.stack.imgur.com/Orz5e.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Orz5e.png" alt="Command where I fire command for running yaml file " /></a></p>

Akash Tawade
<p>The yaml syntax for pod should be like below</p>
<pre><code>apiVersion: v1
kind: Pod
metadata: 
  name: webapp
spec: 
  containers: 
  - name: webappcontainer 
    image: richardchesterwood/k8s-fleetman-webapp-angular:release0
</code></pre>
