<p>I am trying to delete a namespace but it is in terminating state, I tried removing the finalizer and applying replace but not able to succeed. Below are the steps and error</p>

<pre><code>[root@~]# kubectl replace "/api/v1/namespaces/service-catalog/finalize" -f n.json
namespace/service-catalog replaced
[root@~]#
[root@~]#
[root@~]# k get ns service-catalog
NAME              STATUS        AGE
service-catalog   Terminating   6d21h
[root@~]# k delete ns service-catalog
Error from server (Conflict): Operation cannot be fulfilled on namespaces "service-catalog": The system is ensuring all content is removed from this namespace.  Upon completion, this namespace will automatically be purged by the system.
</code></pre>

<p>In the namespace I had created few crd objects and my good guess is those are the thing which are preventing it from deletion. Right now I am not able memorise all the crd object that I created. </p>

<p>Is there a way where I can query all the object with the <code>finalizer: service-catalog</code>?</p>

<p>I was looking for all the finalizers that were used in our cluster and this worked for me. It checks for all types of objects in all namespaces and returns their finalizers -- you can probably use awk and grep to filter it out for what you're looking for</p>
<p><code>kubectl get all  -o custom-columns=Kind:.kind,Name:.metadata.name,Finalizers:.metadata.finalizers --all-namespaces </code></p>
<p>Note, this doesn't return the cluster scoped resources</p>
