Last active
January 13, 2022 17:21
-
-
Save rohantmp/5639c0af8cfab4904c54ea9a07cfd9a1 to your computer and use it in GitHub Desktop.
Instructions to forcibly cleanup OCS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
#Delete any apps consuming PVCs based on OCS storageclasses, and then delete the PVs | |
#Delete the StorageCluster object without deleting its dependents. | |
oc delete -n openshift-storage storagecluster --all --wait=true --cascade=false | |
#Delete the Noobaa resource. | |
oc delete -n openshift-storage noobaa noobaa --wait=true | |
#Wait for the Noobaa PVC to be automatically deleted. | |
oc wait -n openshift-storage --for delete pvc -l noobaa-core=noobaa --timeout=5m | |
#Delete the CephCluster resource and wait for it to finish deleting. | |
oc delete -n openshift-storage cephcluster --all --wait=true --timeout=5m | |
#Delete the Namespaces and wait for them to finish deleting. | |
oc delete project openshift-storage --wait=true --timeout=5m | |
# remove the taint from storage nodes | |
oc adm taint nodes --all node.ocs.openshift.io/storage- | |
# unlabel the nodes the storage nodes | |
oc label node --all cluster.ocs.openshift.io/openshift-storage- | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use this to check that everything is gone: