<p>I ran:</p>
<pre><code>kubectl api-resources | grep &quot;External&quot;
externalmetrics                                     metrics.aws                    true         ExternalMetric
</code></pre>
<p>I want to delete this <code>metrics.aws</code> API resource, but I am not even sure how it was deployed. How can I delete this safely?</p>

Mudits
<ul>
<li>If it is a not a standard resource, then It might be implemented as a &quot;Customer Resource Definition (crds)&quot;</li>
</ul>
<pre class="lang-bash prettyprint-override"><code>kubectl get crds | grep externalmetrics 
</code></pre>
<ul>
<li>Check if there are any Custom Resources created under this crd and delete them if there any :</li>
</ul>
<pre class="lang-bash prettyprint-override"><code>kubectl get externalmetrics
kubectl delete externalmetrics --all 
</code></pre>
<ul>
<li>Then delete that CRD</li>
</ul>
<pre class="lang-bash prettyprint-override"><code>kubectl delete crd externalmetrics
</code></pre>
<ul>
<li>Check if it is gone from api-resources list</li>
</ul>
<pre class="lang-bash prettyprint-override"><code>kubectl get api-resources
</code></pre>
<p><strong>Update:</strong></p>
<p>If you see <code>error: the server doesn't have a resource type &quot;v1beta1&quot;</code> error then run the following command to remove it:</p>
<pre class="lang-bash prettyprint-override"><code>kubectl delete apiservice v1beta1.metrics.k8s.io
</code></pre>
