Upgrade with the operator
You can easily upgrade an existing Astra Trident installation using the operator either manually or using Helm.
Upgrade using the Trident operator
Generally, you should upgrade Astra Trident using the same method that was used to originally install it. Review Select an upgrade method before attempting to upgrade with the Trident operator.
When upgrading from an instance of Astra Trident installed using the namespace-scoped operator (versions 20.07 through 20.10), the Trident operator automatically:
|
Upgrade a cluster-scoped Trident operator installation
You can upgrade a cluster-scoped Trident operator installation. All Astra Trident versions 21.01 and above use a cluster-scoped operator.
Ensure you are using a Kubernetes cluster running a supported Kubernetes version.
-
Verify your Astra Trident version:
./tridentctl -n trident version
-
Delete the Trident operator that was used to install the current Astra Trident instance. For example, if you are upgrading from 22.01, run the following command:
kubectl delete -f 22.01/trident-installer/deploy/bundle.yaml -n trident
-
If you customized your initial installation using
TridentOrchestrator
attributes, you can edit theTridentOrchestrator
object to modify the installation parameters. This might include changes made to specify mirrored Trident and CSI image registries for offline mode, enable debug logs, or specify image pull secrets. -
Install Astra Trident using the correct bundle YAML file for your environment and Astra Trident version. For example, if you are installing Astra Trident 23.04 for Kubernetes 1.27, run the following command:
kubectl create -f 23.04.0/trident-installer/deploy/bundle_post_1_25.yaml -n trident
Trident provides a bundle file that can be used to install the operator and create associated objects for your Kubernetes version.
-
For clusters running Kubernetes 1.24 or earlier, use bundle_pre_1_25.yaml.
-
For clusters running Kubernetes 1.25 or later, use bundle_post_1_25.yaml.
-
The Trident operator will identify an existing Astra Trident installation and upgrade it to the same version as the operator.
Upgrade a namespace-scoped operator installation
You can upgrade from an instance of Astra Trident installed using the namespace-scoped operator (versions 20.07 through 20.10) to a cluster-scoped operator installation.
You need the bundle YAML file used to deploy the namespace-scoped operator from https://github.com/NetApp/trident/tree/stable/vXX.XX/deploy/BUNDLE.YAML
where vXX.XX
is the version number and BUNDLE.YAML
is the bundle YAML file name.
-
Verify the
TridentProvisioner
status of the existing Trident installation isInstalled
.kubectl describe tprov trident -n trident | grep Message: -A 3 Message: Trident installed Status: Installed Version: v20.10.1
If status shows Updating
, ensure you resolve it before proceeding. For a list of possible status values, see here. -
Create the
TridentOrchestrator
CRD by using the manifest provided with the Trident installer.# Download the release required [23.04.0] mkdir 23.04.0 cd 23.04.0 wget https://github.com/NetApp/trident/releases/download/v23.04.0/trident-installer-23.04.0.tar.gz tar -xf trident-installer-23.04.0.tar.gz cd trident-installer kubectl create -f deploy/crds/trident.netapp.io_tridentorchestrators_crd_post1.16.yaml
-
Delete the namespace-scoped operator by using its manifest.
-
Ensure you are in the right directory.
pwd /root/20.10.1/trident-installer
-
Delete the namespace-scoped operator.
kubectl delete -f deploy/<BUNDLE.YAML> -n trident serviceaccount "trident-operator" deleted clusterrole.rbac.authorization.k8s.io "trident-operator" deleted clusterrolebinding.rbac.authorization.k8s.io "trident-operator" deleted deployment.apps "trident-operator" deleted podsecuritypolicy.policy "tridentoperatorpods" deleted
-
Confirm the Trident operator was removed.
kubectl get all -n trident NAME READY STATUS RESTARTS AGE pod/trident-csi-68d979fb85-dsrmn 6/6 Running 12 99d pod/trident-csi-8jfhf 2/2 Running 6 105d pod/trident-csi-jtnjz 2/2 Running 6 105d pod/trident-csi-lcxvh 2/2 Running 8 105d NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/trident-csi ClusterIP 10.108.174.125 <none> 34571/TCP,9220/TCP 105d NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE daemonset.apps/trident-csi 3 3 3 3 3 kubernetes.io/arch=amd64,kubernetes.io/os=linux 105d NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/trident-csi 1/1 1 1 105d NAME DESIRED CURRENT READY AGE replicaset.apps/trident-csi-68d979fb85 1 1 1 105d
-
-
(Optional) If the install parameters need to be modified, update the
TridentProvisioner
spec. This can include changes such as changing: the values fortridentImage
,autosupportImage
, private image repository, and providingimagePullSecrets
) after deleting the namespace-scoped operator and before installing the cluster-scoped operator. For a complete list of parameters that can be updated, refer to the configuration options.kubectl patch tprov <trident-provisioner-name> -n <trident-namespace> --type=merge -p '{"spec":{"debug":true}}'
-
Install the Trident cluster-scoped operator.
-
Ensure you are in the correct directory.
pwd /root/23.04.0/trident-installer
-
Install the cluster-scoped operator in the same namespace.
Trident provides a bundle file that can be used to install the operator and create associated objects for your Kubernetes version.
-
For clusters running Kubernetes 1.24 or earlier, use bundle_pre_1_25.yaml.
-
For clusters running Kubernetes 1.25 or later, use bundle_post_1_25.yaml.
kubectl create -f deploy/<BUNDLE.YAML> serviceaccount/trident-operator created clusterrole.rbac.authorization.k8s.io/trident-operator created clusterrolebinding.rbac.authorization.k8s.io/trident-operator created deployment.apps/trident-operator created podsecuritypolicy.policy/tridentoperatorpods created #All tridentProvisioners will be removed, including the CRD itself kubectl get tprov -n trident Error from server (NotFound): Unable to list "trident.netapp.io/v1, Resource=tridentprovisioners": the server could not find the requested resource (get tridentprovisioners.trident.netapp.io) #tridentProvisioners are replaced by tridentOrchestrator kubectl get torc NAME AGE trident 13s
-
-
Examine the Trident pods in the namespace. The
trident-controller
and pod names reflect the naming convention introduced in 23.01.kubectl get pods -n trident NAME READY STATUS RESTARTS AGE trident-controller-79df798bdc-m79dc 6/6 Running 0 1m41s trident-node-linux-xrst8 2/2 Running 0 1m41s trident-operator-5574dbbc68-nthjv 1/1 Running 0 1m52s
-
Confirm Trident has been updated to the intended version.
kubectl describe torc trident | grep Message -A 3 Message: Trident installed Namespace: trident Status: Installed Version: v23.04.0
-
Upgrade a Helm-based operator installation
Perform the following steps to upgrade a Helm-based operator installation.
When upgrading a Kubernetes cluster from 1.24 to 1.25 or later that has Astra Trident installed, you must update values.yaml to set excludePodSecurityPolicy to true or add --set excludePodSecurityPolicy=true to the helm upgrade command before you can upgrade the cluster.
|
-
Download the latest Astra Trident release.
-
Use the
helm upgrade
command wheretrident-operator-23.04.0.tgz
reflects the version that you want to upgrade to.helm upgrade <name> trident-operator-23.04.0.tgz
If you set any non-default options during the initial installation (such as specifying private, mirrored registries for Trident and CSI images), use
--set
to ensure those options are included in the upgrade command, otherwise the values will reset to default.For example, to change the default value of
tridentDebug
, run the following command:helm upgrade <name> trident-operator-23.04.0-custom.tgz --set tridentDebug=true
-
Run
helm list
to verify that the chart and app version have both been upgraded. Runtridentctl logs
to review any debug messages.
The Trident operator will identify an existing Astra Trident installation and upgrade it to the same version as the operator.
Upgrade from a non-operator installation
You can upgrade to the latest release of the Trident operator from a tridentctl
installation.
-
Download the latest Astra Trident release.
# Download the release required [23.04.0] mkdir 23.04.0 cd 23.04.0 wget https://github.com/NetApp/trident/releases/download/v22.01.1/trident-installer-23.04.0.tar.gz tar -xf trident-installer-23.04.0.tar.gz cd trident-installer
-
Create the
tridentorchestrator
CRD from the manifest.kubectl create -f deploy/crds/trident.netapp.io_tridentorchestrators_crd_post1.16.yaml
-
Deploy the cluster-scoped operator in the same namespace.
kubectl create -f deploy/<BUNDLE.YAML> serviceaccount/trident-operator created clusterrole.rbac.authorization.k8s.io/trident-operator created clusterrolebinding.rbac.authorization.k8s.io/trident-operator created deployment.apps/trident-operator created podsecuritypolicy.policy/tridentoperatorpods created #Examine the pods in the Trident namespace NAME READY STATUS RESTARTS AGE trident-controller-79df798bdc-m79dc 6/6 Running 0 150d trident-node-linux-xrst8 2/2 Running 0 150d trident-operator-5574dbbc68-nthjv 1/1 Running 0 1m30s
-
Create a
TridentOrchestrator
CR for installing Astra Trident.cat deploy/crds/tridentorchestrator_cr.yaml apiVersion: trident.netapp.io/v1 kind: TridentOrchestrator metadata: name: trident spec: debug: true namespace: trident kubectl create -f deploy/crds/tridentorchestrator_cr.yaml #Examine the pods in the Trident namespace NAME READY STATUS RESTARTS AGE trident-csi-79df798bdc-m79dc 6/6 Running 0 1m trident-csi-xrst8 2/2 Running 0 1m trident-operator-5574dbbc68-nthjv 1/1 Running 0 5m41s
-
Confirm Trident was upgraded to the intended version.
kubectl describe torc trident | grep Message -A 3 Message: Trident installed Namespace: trident Status: Installed Version: v23.04.0
The existing backends and PVCs are automatically available.