Uninstallation
Prerequisite
To prevent SUSE Storage from being accidentally uninstalled (which leads to data lost), there is a new setting, deleting-confirmation-flag. If this flag is false
, the uninstallation job will fail. Set this flag to true
to allow uninstallation. You can set this flag using setting page in the SUSE Storage UI or kubectl -n longhorn-system patch -p '{"value": "true"}' --type=merge lhs deleting-confirmation-flag
.
To prevent damage to the Kubernetes cluster, it is recommended to delete all Kubernetes workloads using SUSE Storage volumes (PersistentVolume, PersistentVolumeClaim, StorageClass, Deployment, StatefulSet, DaemonSet, etc).
Completely Remove SUSE Storage
To completely remove the SUSE Storage deployment from your Kubernetes cluster, use the helm uninstall
command.
helm uninstall longhorn --namespace longhorn-system
Uninstalling SUSE Storage from the Rancher UI
From Rancher UI, navigate to Catalog Apps
tab and delete the SUSE Storage app.
Uninstalling SUSE Storage using Helm
Run the following command:
helm uninstall longhorn -n longhorn-system
Uninstalling SUSE Storage Using Helm Controller
Run the following command:
kubectl delete helmchart <HelmChart name> -n <HelmChart namespace>
Uninstalling SUSE Storage Using Helm Controller
Run the following command:
kubectl delete helmchart <HelmChart name> -n <HelmChart namespace>
Uninstalling SUSE Storage Using Fleet
Run the following command:
kubectl delete GitRepo longhorn -n fleet-local
After the longhorn-uninstall
job is completed, run the following command:
kubectl delete -f https://raw.githubusercontent.com/longhorn/longhorn/v1.9.1/deploy/longhorn.yaml
Uninstalling SUSE Storage Using Flux
Run the following command:
flux delete helmrelease longhorn-release -n longhorn-system
Uninstalling SUSE Storage Using Argo CD
Argo CD currently does not support the PreDelete resource hook. Instead of running argocd app delete longhorn
directly, you must uninstall SUSE Storage using kubectl to prevent dangling resources from remaining in the longhorn-system
namespace.