<p>I am following a MongoDB tutorial on Kubernetes, but when I create the configuration map, it gives me this error:</p>
<blockquote>
<p>error: unable to recognize &quot;mongo-configmap.yaml&quot;: no matches for kind &quot;ConfigMap&quot; in version &quot;V1&quot;</p>
</blockquote>
<p>This is the <em>mongo-configmap.yaml</em> file:</p>
<pre><code>apiVersion: V1
kind: ConfigMap
metadata:
  name: mongodb-configmap
data:
  database_url: mongodb-service
</code></pre>

Battistis Ciccio Rossi
<p>The version should be lower case.</p>
<pre class="lang-none prettyprint-override"><code>apiVersion: v1
lang-none
</code></pre>
<p>You can run the below command to refer to the attributes.</p>
<pre class="lang-none prettyprint-override"><code>kubectl explain cm | head
</code></pre>
<p>Or</p>
<pre class="lang-none prettyprint-override"><code>kubectl explain cm --recursive | grep -i &lt;attribute&gt; or head
</code></pre>
<pre class="lang-none prettyprint-override"><code>KIND:     ConfigMap
VERSION:  v1

DESCRIPTION:
     ConfigMap holds configuration data for pods to consume.

FIELDS:
   apiVersion    &lt;string&gt;
   binaryData    &lt;map[string]string&gt;
   data    &lt;map[string]string&gt;
</code></pre>
