<p>I am trying to create some sample kubernetes pod file.</p>

<pre><code>cat &lt;&lt; EOF | kubectl create -f -
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- name: nginx
  image: nginx
EOF
</code></pre>

<p>But on executing this I am getting below error.</p>

<blockquote>
  <p>error: error validating "pod.yaml": error validating data:
  [ValidationError(Pod): unknown field "containers" in
  io.k8s.api.core.v1.Pod, ValidationError(Pod): unknown field "na me" in
  io.k8s.api.core.v1.Pod]; if you choose to ignore these errors, turn
  validation off with --validate=false</p>
</blockquote>

Rocky Hai
<p>I am not sure about the exact issue but it got resolved with proper space indentation</p>

<pre><code>---
apiVersion: v1
kind: Pod
metadata:
 name: nginx
spec:
 containers:
   - name: nginx
     image: nginx
</code></pre>

<p>It worked for me now with proper spaces. Mybad</p>
