Uninstall (For test purposes only, not for production use)
To ensure data security, it is strongly recommended not to uninstall the HwameiStor system in a production environment. This section introduces two uninstallation scenarios for testing environments.
Uninstall but retain data volumes
If you want to uninstall the HwameiStor components, but still keep the existing data volumes working with the applications, perform the following steps:
$ kubectl get cluster.hwameistor.io
NAME AGE
cluster-sample 21m
$ kubectl delete clusters.hwameistor.io hwameistor-cluster
Finally, all the HwameiStor's components (i.e. Pods) will be deleted. Check by:
kubectl -n hwameistor get pod
Uninstall and delete data volumes
Before you start to perform actions, make sure you reallly want to delete all your data.
If you confirm to delete your data volumes and uninstall HwameiStor, perform the following steps:
Clean up stateful applications.
Delete stateful applications.
Delete PVCs.
The relevant PVs, LVs, LVRs, LVGs will also been deleted.
Clean up HwameiStor components.
Delete HwameiStor components.
kubectl delete clusters.hwameistor.io hwameistor-cluster
Delete hwameistor namespace.
kubectl delete ns hwameistor
Delete CRD, Hook, and RBAC.
kubectl get crd,mutatingwebhookconfiguration,clusterrolebinding,clusterrole -o name \
| grep hwameistor \
| xargs -t kubectl deleteDelete StorageClass.
kubectl get sc -o name \
| grep hwameistor-storage-lvm- \
| xargs -t kubectl deleteDelete hwameistor-operator.
helm uninstall hwameistor-operator -n hwameistor
Finally, you still need to clean up the LVM configuration on each node, and also data on the disks by tools like wipefs.
wipefs -a /dev/sdx
blkid /dev/sdx