Upgrade with tridentctl
You can easily upgrade an existing Astra Trident installation using tridentctl
.
Upgrade Astra Trident using tridentctl
Uninstalling and reinstalling Astra Trident acts as an upgrade. When you uninstall Trident, the Persistent Volume Claim (PVC) and Persistent Volume (PV) used by the Astra Trident deployment are not deleted. PVs that have already been provisioned will remain available while Astra Trident is offline, and Astra Trident will provision volumes for any PVCs that are created in the interim once it is back online.
Review Select an upgrade method before upgrading using tridentctl
.
-
Run 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>
-
Reinstall Astra Trident. Refer to Install Astra Trident using tridentctl.
Do not interrupt the upgrade process. Ensure the installer runs to completion. |
Upgrade volumes using tridentctl
After upgrade, you can make use of the rich set of features that are available in newer Trident releases (such as, On-Demand Volume Snapshots), you can upgrade the volumes using the tridentctl upgrade
command.
If there are legacy volumes, you should upgrade them from a NFS or iSCSI type to the CSI type to use the complete set of new features in Astra Trident. A legacy PV that has been provisioned by Trident supports the traditional set of features.
Consider the following before deciding to upgrade volumes to the CSI type:
-
You might not need to upgrade all the volumes. Previously created volumes will continue to be accessible and function normally.
-
A PV can be mounted as part of a deployment/StatefulSet when upgrading. It is not required to bring down the deployment/StatefulSet.
-
You cannot attach a PV to a standalone pod when upgrading. You should shut down the pod before upgrading the volume.
-
You can upgrade only a volume that is bound to a PVC. Volumes that are not bound to PVCs should be removed and imported before upgrading.
-
Run
kubectl get pv
to list the PVs.kubectl get pv NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE default-pvc-1-a8475 1073741824 RWO Delete Bound default/pvc-1 standard 19h default-pvc-2-a8486 1073741824 RWO Delete Bound default/pvc-2 standard 19h default-pvc-3-a849e 1073741824 RWO Delete Bound default/pvc-3 standard 19h default-pvc-4-a84de 1073741824 RWO Delete Bound default/pvc-4 standard 19h trident 2Gi RWO Retain Bound trident/trident 19h
There are currently four PVs that have been created by Trident 20.07, using the
netapp.io/trident
provisioner. -
Run
kubectl describe pv
to get the details of the PV.kubectl describe pv default-pvc-2-a8486 Name: default-pvc-2-a8486 Labels: <none> Annotations: pv.kubernetes.io/provisioned-by: netapp.io/trident volume.beta.kubernetes.io/storage-class: standard Finalizers: [kubernetes.io/pv-protection] StorageClass: standard Status: Bound Claim: default/pvc-2 Reclaim Policy: Delete Access Modes: RWO VolumeMode: Filesystem Capacity: 1073741824 Node Affinity: <none> Message: Source: Type: NFS (an NFS mount that lasts the lifetime of a pod) Server: 10.xx.xx.xx Path: /trid_1907_alpha_default_pvc_2_a8486 ReadOnly: false
The PV was created by using the
netapp.io/trident
provisioner and is of the type NFS. To support all the new features provided by Astra Trident, this PV should be upgraded to the CSI type. -
Run the
tridentctl upgrade volume <name-of-trident-volume>
command to upgrade a legacy Astra Trident volume to the CSI spec../tridentctl get volumes -n trident +---------------------+---------+---------------+----------+--------------------------------------+--------+---------+ | NAME | SIZE | STORAGE CLASS | PROTOCOL | BACKEND UUID | STATE | MANAGED | +---------------------+---------+---------------+----------+--------------------------------------+--------+---------+ | default-pvc-2-a8486 | 1.0 GiB | standard | file | c5a6f6a4-b052-423b-80d4-8fb491a14a22 | online | true | | default-pvc-3-a849e | 1.0 GiB | standard | file | c5a6f6a4-b052-423b-80d4-8fb491a14a22 | online | true | | default-pvc-1-a8475 | 1.0 GiB | standard | file | c5a6f6a4-b052-423b-80d4-8fb491a14a22 | online | true | | default-pvc-4-a84de | 1.0 GiB | standard | file | c5a6f6a4-b052-423b-80d4-8fb491a14a22 | online | true | +---------------------+---------+---------------+----------+--------------------------------------+--------+---------+ ./tridentctl upgrade volume default-pvc-2-a8486 -n trident +---------------------+---------+---------------+----------+--------------------------------------+--------+---------+ | NAME | SIZE | STORAGE CLASS | PROTOCOL | BACKEND UUID | STATE | MANAGED | +---------------------+---------+---------------+----------+--------------------------------------+--------+---------+ | default-pvc-2-a8486 | 1.0 GiB | standard | file | c5a6f6a4-b052-423b-80d4-8fb491a14a22 | online | true | +---------------------+---------+---------------+----------+--------------------------------------+--------+---------+
-
Run a
kubectl describe pv
to verify that the volume is a CSI volume.kubectl describe pv default-pvc-2-a8486 Name: default-pvc-2-a8486 Labels: <none> Annotations: pv.kubernetes.io/provisioned-by: csi.trident.netapp.io volume.beta.kubernetes.io/storage-class: standard Finalizers: [kubernetes.io/pv-protection] StorageClass: standard Status: Bound Claim: default/pvc-2 Reclaim Policy: Delete Access Modes: RWO VolumeMode: Filesystem Capacity: 1073741824 Node Affinity: <none> Message: Source: Type: CSI (a Container Storage Interface (CSI) volume source) Driver: csi.trident.netapp.io VolumeHandle: default-pvc-2-a8486 ReadOnly: false VolumeAttributes: backendUUID=c5a6f6a4-b052-423b-80d4-8fb491a14a22 internalName=trid_1907_alpha_default_pvc_2_a8486 name=default-pvc-2-a8486 protocol=file Events: <none>