Skip to content

Instantly share code, notes, and snippets.

@ikurni
Last active March 9, 2021 03:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ikurni/84dfc487895852437dc6b5c5f0ef9cd6 to your computer and use it in GitHub Desktop.
Save ikurni/84dfc487895852437dc6b5c5f0ef9cd6 to your computer and use it in GitHub Desktop.
How to Manually remove OCS Cluster from Openshift
### In order to remove OCS Cluster manually, when resources are stucked, need to patch the resources manually as below :
[root@ocpbastion ~]# oc patch -n openshift-stroage crd/cephobjectstoreusers.ceph.rook.io --type=merge -p '{"metadata": {"finalizers":null}}'
customresourcedefinition.apiextensions.k8s.io/cephobjectstoreusers.ceph.rook.io patched
[root@ocpbastion ~]# oc patch -n openshift-stroage crd/cephblockpools.ceph.rook.io --type=merge -p '{"metadata": {"finalizers":null}}'
customresourcedefinition.apiextensions.k8s.io/cephblockpools.ceph.rook.io patched
[root@ocpbastion ~]# oc patch -n openshift-stroage crd/cephclusters.ceph.rook.io --type=merge -p '{"metadata": {"finalizers":null}}'
customresourcedefinition.apiextensions.k8s.io/cephclusters.ceph.rook.io patched
[root@ocpbastion ~]# oc patch -n openshift-stroage crd/cephfilesystems.ceph.rook.io --type=merge -p '{"metadata": {"finalizers":null}}'
customresourcedefinition.apiextensions.k8s.io/cephfilesystems.ceph.rook.io patched
[root@ocpbastion ~]# oc patch -n openshift-stroage crd/cephobjectstores.ceph.rook.io --type=merge -p '{"metadata": {"finalizers":null}}'
customresourcedefinition.apiextensions.k8s.io/cephobjectstores.ceph.rook.io patched
[root@ocpbastion ~]# oc patch -n openshift-stroage crd/storageclusters.ocs.openshift.io --type=merge -p '{"metadata": {"finalizers":null}}'
customresourcedefinition.apiextensions.k8s.io/storageclusters.ocs.openshift.io patched
[root@ocpbastion ~]# oc patch crd/backingstores.noobaa.io --type=merge -p '{"metadata": {"finalizers":null}}'
customresourcedefinition.apiextensions.k8s.io/backingstores.noobaa.io patched
[root@ocpbastion ~]# oc patch crd/bucketclasses.noobaa.io --type=merge -p '{"metadata": {"finalizers":null}}'
customresourcedefinition.apiextensions.k8s.io/bucketclasses.noobaa.io patched
[root@ocpbastion ~]# oc patch crd/noobaas.noobaa.io --type=merge -p '{"metadata": {"finalizers":null}}'
customresourcedefinition.apiextensions.k8s.io/noobaas.noobaa.io patched
### After deletion of the resources has been done, make sure the openshift-storage namespace also need to be deleted as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment