<p>I am trying to delete a configmap from a k8s namespace .. i created the configmap using the command below</p>

<p><code>kubectl -n namespacename create -f configmap.yaml</code></p>

<p>checking the k8s cheat sheet <a href="https://kubernetes.io/docs/reference/kubectl/cheatsheet/" rel="noreferrer">https://kubernetes.io/docs/reference/kubectl/cheatsheet/</a> i didn't find anything related .. kindly advise how to do that ?</p>

Hany Habib
<h3>To delete <code>configmap</code> using configmap name:</h3>

<pre class="lang-sh prettyprint-override"><code># kubectl delete configmap  &lt;configmap-name&gt;  -n  &lt;namespace-name&gt; 
$ kubectl delete configmap    my-cofigmap     -n   namespacename 
</code></pre>

<h3>To delete <code>configmap</code> using configmap yaml file:</h3>

<pre class="lang-sh prettyprint-override"><code># kubectl delete -f &lt;file-directory&gt; -n &lt;namespace-name&gt;
$ kubectl delete -f  configmap.yaml  -n  namespacename
</code></pre>
