Upgrade a Trident operator installation

Contributors juliantap netapp-dbagwell balaramesh

You can upgrade Astra Trident using the Trident operator either manually or using Helm. You can upgrade from a Trident operator installation to another Trident operator installation or upgrade from a tridentctl installation to a Trident operator version. Review Select an upgrade method before upgrading a Trident operator installation.

Upgrade a manual installation

You can upgrade from a cluster-scoped Trident operator installation to another cluster-scoped Trident operator installation. All Astra Trident versions 21.01 and above use a cluster-scoped operator.

Note To upgrade from Astra Trident that was installed using the namespace-scoped operator (versions 20.07 through 20.10), use the upgrade instructions for your installed version of Astra Trident.
About this task

Trident provides a bundle file you can use to install the operator and create associated objects for your Kubernetes version.

Before you begin

Ensure you are using a Kubernetes cluster running a supported Kubernetes version.

  1. Verify your Astra Trident version:

    ./tridentctl -n trident version
  2. Delete the Trident operator that was used to install the current Astra Trident instance. For example, if you are upgrading from 23.04, run the following command:

    kubectl delete -f 23.04/trident-installer/deploy/<bundle-name.yaml> -n trident
  3. If you customized your initial installation using TridentOrchestrator attributes, you can edit the TridentOrchestrator 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.

  4. 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.07 for Kubernetes 1.27, run the following command:

    kubectl create -f 23.07.1/trident-installer/deploy/bundle_post_1_25.yaml -n trident

Upgrade a Helm installation

You can upgrade an Astra Trident Helm installation.

Warning 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.
  1. Download the latest Astra Trident release.

  2. Use the helm upgrade command where trident-operator-23.07.1.tgz reflects the version that you want to upgrade to.

    helm upgrade <name> trident-operator-23.07.1.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.07.1-custom.tgz --set tridentDebug=true
  3. Run helm list to verify that the chart and app version have both been upgraded. Run tridentctl logs to review any debug messages.

Upgrade from a tridentctl installation to Trident operator

You can upgrade to the latest release of the Trident operator from a tridentctl installation. The existing backends and PVCs will automatically be available.

Note Before switching between installation methods, review Moving between installation methods
  1. Download the latest Astra Trident release.

    # Download the release required [23.07.1]
    mkdir 23.07.1
    cd 23.07.1
    wget https://github.com/NetApp/trident/releases/download/v22.01.1/trident-installer-23.07.1.tar.gz
    tar -xf trident-installer-23.07.1.tar.gz
    cd trident-installer
  2. Create the tridentorchestrator CRD from the manifest.

    kubectl create -f deploy/crds/trident.netapp.io_tridentorchestrators_crd_post1.16.yaml
  3. Deploy the cluster-scoped operator in the same namespace.

    kubectl create -f deploy/<bundle-name.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
  4. Create a TridentOrchestrator CR for installing Astra Trident.

    cat deploy/crds/tridentorchestrator_cr.yaml
    apiVersion: trident.netapp.io/v1
    kind: TridentOrchestrator
      name: trident
      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
  5. 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.07.1