Uninstall Astra Trident
You should use the same method to uninstall Astra Trident that you used to install Astra Trident.
-
If you need a fix for bugs observed after an upgrade, dependency issues, or an unsuccessful or incomplete upgrade, you should uninstall Astra Trident and reinstall the earlier version using the specific instructions for that version. This is the only recommended way to downgrade to an earlier version.
-
For easy upgrade and reinstallation, uninstalling Astra Trident does not remove the CRDs or related objects created by Astra Trident. If you need to completely remove Astra Trident and all of its data, refer to Completely remove Astra Trident and CRDs.
If you are decommissioning Kubernetes clusters, you must delete all applications that use volumes created by Astra Trident prior to uninstalling. This ensures that PVCs are unpublished on Kubernetes nodes before they are deleted.
Determine the original installation method
You should use the same method to uninstall Astra Trident that you used to install it. Before uninstalling, verify which version you used to originally install Astra Trident.
-
Use
kubectl get pods -n trident
to examine the pods.-
If there is no operator pod, Astra Trident was installed using
tridentctl
. -
If there is an operator pod, Astra Trident was installed using the Trident operator either manually or using Helm.
-
-
If there is an operator pod, use
kubectl describe tproc trident
to determine if Astra Trident was installed using Helm.-
If there is a Helm label, Astra Trident was installed using Helm.
-
If there is no Helm label, Astra Trident was installed manually using the Trident operator.
-
Uninstall a Trident operator installation
You can uninstall a trident operator installation manually or using Helm.
Uninstall manual installation
If you installed Astra Trident using the operator, you can uninstall it by doing one of the following:
-
Edit
TridentOrchestrator
CR and set the uninstall flag:kubectl patch torc <trident-orchestrator-name> --type=merge -p '{"spec":{"uninstall":true}}'
When the
uninstall
flag is set totrue
, the Trident operator uninstalls Trident, but does not remove the TridentOrchestrator itself. You should clean up the TridentOrchestrator and create a new one if you want to install Trident again. -
Delete
TridentOrchestrator
: By removing theTridentOrchestrator
CR that was used to deploy Astra Trident, you instruct the operator to uninstall Trident. The operator processes the removal ofTridentOrchestrator
and proceeds to remove the Astra Trident deployment and daemonset, deleting the Trident pods it had created as part of the installation.kubectl delete -f deploy/<bundle.yaml> -n <namespace>
Uninstall Helm installation
If you installed Astra Trident by using Helm, you can uninstall it by using helm uninstall
.
#List the Helm release corresponding to the Astra Trident install. helm ls -n trident NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION trident trident 1 2021-04-20 00:26:42.417764794 +0000 UTC deployed trident-operator-21.07.1 21.07.1 #Uninstall Helm release to remove Trident helm uninstall trident -n trident release "trident" uninstalled
Uninstall a tridentctl
installation
Use the uninstall
command in tridentctl
to remove all of the resources associated with Astra Trident except for the CRDs and related objects:
./tridentctl uninstall -n <namespace>