Manually Uninstalling Huawei CSI
This section describes how to manually uninstall Huawei CSI.
If you do not uninstall Huawei CSI for the purpose of an upgrade, ensure that all resources (such as PV, PVC, snapshot, and storage backend resources) provisioned by Huawei CSI have been cleared on your container platform before uninstalling Huawei CSI. Otherwise, once you uninstall Huawei CSI, these resources cannot be automatically scheduled, managed, or cleared.
Uninstalling the huawei-csi-node Service
Use a remote access tool, such as PuTTY, to log in to any master node in the Kubernetes cluster through the management IP address.
Run the following command to uninstall the huawei-csi-node service. Replace huawei-csi with the namespace where Huawei CSI is located.
kubectl delete daemonset huawei-csi-node -n huawei-csi
Run the following command to check whether the service is successfully uninstalled. If NotFound is displayed, the service is successfully uninstalled.
kubectl get daemonset huawei-csi-node -n huawei-csi
Uninstalling the huawei-csi-controller Service
Use a remote access tool, such as PuTTY, to log in to any master node in the Kubernetes cluster through the management IP address.
Run the following command to uninstall the huawei-csi-controller service. Replace huawei-csi with the namespace where Huawei CSI is located.
kubectl delete deployment huawei-csi-controller -n huawei-csi
Run the following command to check whether the service is successfully uninstalled. If NotFound is displayed, the service is successfully uninstalled.
kubectl get deployment huawei-csi-controller -n huawei-csi
Uninstalling the csidriver Object
If the CSIDriver feature is not used during installation, you can skip the following steps.
Use a remote access tool, such as PuTTY, to log in to any master node in the Kubernetes cluster through the management IP address.
Run the following command to uninstall the csidriver object.
kubectl delete csidriver csi.huawei.com
Run the following command to check whether the service is successfully uninstalled. If NotFound is displayed, the service is successfully uninstalled.
kubectl get csidriver csi.huawei.com
Deleting the RBAC Permission
Use a remote access tool, such as PuTTY, to log in to any master node in the Kubernetes cluster through the management IP address.
Delete the RBAC permission.
kubectl -n huawei-csi -l provisioner=csi.huawei.com delete ServiceAccount,Service,role,rolebinding,ClusterRole,ClusterRoleBinding
Uninstalling Other Resources
- Uninstall the huawei-csi-host-info object. For details, see Uninstalling the huawei-csi-host-info Object.
- Uninstall the webhook resource. For details, see Uninstalling a Webhook Resource.
- (Optional) Uninstall the snapshot-dependent component service. For details, see Uninstalling the Snapshot-Dependent Component Service.
- (Optional) Uninstall the Lease resource. For details, see Uninstalling a Lease Resource.