<p>I'm trying to create a config map from my mongodb configuration file. I have used the following command:</p>
<pre><code>kubectl create configMap mongodb-config-file --from-file=conf=mongodb.cfg
</code></pre>
<p>and I get this error:</p>
<blockquote>
<p>Error: unknown flag: --from-file<br />
See 'kubectl create --help' for usage.</p>
</blockquote>
<p>Why is <code>--from-file</code> an unknown flag? Am I missing something? I'm using windows if that information is useful. I'm still new to kubernetes and kubectl so any extra information on configMaps is welcome.</p>
<p>I tried to find a solution on Google or other stack overflow questions and couldn't find one.</p>

KraveXL
<p>The proper syntax for a <code>configMap</code> object creation is as follows:</p>
<pre><code>kubectl create configmap NAME [--from-file=[key=]source]
</code></pre>
<p>The resource object is <code>configmap</code> and not <code>configMap</code>:</p>
<pre><code>kubectl create configmap mongodb-config-file --from-file=conf=mongodb.cfg
</code></pre>
