Uninstall Astra Trident
Depending on how Astra Trident is installed, there are multiple options to uninstall it.
Uninstall by using Helm
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 by using the Trident operator
If you installed Astra Trident by using the operator, you can uninstall it by doing one of the following:
-
Edit
TridentOrchestrator
to set the uninstall flag: You can editTridentOrchestrator
and setspec.uninstall=true
. Edit theTridentOrchestrator
CR and set theuninstall
flag as shown below: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.
To completely remove Astra Trident (including the CRDs it creates) and effectively wipe the slate clean, you can editTridentOrchestrator
to pass thewipeout
option. See the following example:
kubectl patch torc <trident-orchestrator-name> --type=merge -p '{"spec":{"wipeout":["crds"],"uninstall":true}}'
This uninstalls Astra Trident completely and clears all metadata related to the backends and volumes it manages. Subsequent installations are treated as fresh installations.
You should only consider wiping out the CRDs when performing a complete uninstallation. This cannot be undone. Do not wipe out the CRDs unless you are looking to start over and create a fresh Astra Trident installation. |
Uninstall by using tridentctl
Run the uninstall
command in tridentctl
as follows to removes all of the resources associated with Astra Trident except for the CRDs and related objects, thereby making it easy to run the installer again to update to a more recent version.
./tridentctl uninstall -n <namespace>
To perform a complete removal of Astra Trident, you should remove the finalizers for the CRDs created by Astra Trident and delete the CRDs.