<p>I am learning Kubernetes and creating a Pod with configmap. I created a yaml file to create a POD. But I am getting below error</p>

<p>error: error parsing yuvi.yaml: error converting YAML to JSON: YAML: line 13: mapping values are not allowed in this context</p>

<p>My configmap name: yuviconfigmap</p>

<h1>YAML file:</h1>

<hr>

<pre><code>apiVersion: v1
kind: Pod
metadata:
 name: yuvipod1
spec:
 containers:
   - name: yuvicontain
     image: nginx
     volumeMounts:
     - name: yuvivolume
        mountPath: /etc/voulme
  volumes:
  - name: yuvivolume
    configMap:
      name: yuviconfigmap
</code></pre>

<p>The yaml is not as per what kubernetes expects. Below should work.</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: yuvipod1
spec:
  containers:
  - name: yuvicontain
    image: nginx
    volumeMounts:
    - name: yuvivolume
      mountPath: /etc/voulme
  volumes:
    - name: yuvivolume
      configMap:
        name: yuviconfigmap
</code></pre>
