<p>I am trying to delete multiple ConfigMaps at once using a label. With <code>kubectl</code>, I would do it as follow:</p>
<pre class="lang-sh prettyprint-override"><code>kubectl delete cm -l application=my-app
</code></pre>
<p>Kubeclient offers the <code>delete_config_map</code> method, but it requires a name.</p>
<pre class="lang-rb prettyprint-override"><code># `k` is an instance of Kubeclient::Client
k.delete_config_map('my-config-map')
</code></pre>
<hr />
<p><strong>Is there a way to acheive the same behavior as the CLI here?</strong></p>

Richard-Degenne
<p>The way <code>kubectl</code> does operations upon labeled, versus named, resources is that it actually does that in two phases: <code>get -o name $resourceType -l ...</code> and then the actual requested operation upon <code>${those_resource_names}</code></p>
<p>One can run <code>kubectl --v=10</code> (or the <code>v</code> of your choice) to see it in action</p>
<p>Since that behavior is a feature of <code>kubectl</code> and not the kubernetes API itself, it means anyone trying to replicate that handy feature will need to replicate the two-phase approach also</p>
