Skip to main content
本製品の最新リリースがご利用いただけます。
日本語は機械翻訳による参考訳です。内容に矛盾や不一致があった場合には、英語の内容が優先されます。

オペレータにアップグレードしてください

共同作成者

既存の Astra Trident インストールは、オペレータが簡単にアップグレードできます。

必要なもの

オペレータを使用してアップグレードするには、次の条件を満たしている必要があります。

  • CSI ベースの Astra Trident がインストールされている必要があります。CSI Trident を実行しているかどうかを確認するには、 Trident ネームスペースのポッドを調べます。それに続く場合 trident-csi-* CSI Tridentを実行している名前パターン。

  • CRD ベースの Trident をインストールしている必要があります。19.07 以降のすべてのリリースを表します。CSI ベースのインストールを使用している場合は、 CRD ベースのインストールを使用している可能性があります。

  • CSI Trident をアンインストールしても、インストールからのメタデータが保持されている場合は、オペレータを使用してアップグレードできます。

  • 特定の Kubernetes クラスタ内のすべてのネームスペースに存在する Trident のは、 1 つの Astra だけです。

  • を実行する Kubernetes クラスタを使用する必要があります "バージョン1.19~1.24"

  • アルファスナップショットのCRDが存在する場合は、で削除する必要があります tridentctl obliviate alpha-snapshot-crd。これにより、アルファスナップショット仕様の CRD が削除されます。削除または移行が必要な既存のスナップショットについては、を参照してください "この blog"

警告 OpenShift Container Platform で演算子を使用して Trident をアップグレードする場合は、 Trident 21.01.1 以降にアップグレードする必要があります。21.01.0 でリリースされた Trident オペレータには、 21.01.1 で修正された既知の問題が含まれています。詳細については、を参照してください "GitHub の問題の詳細"

クラスタを対象としたオペレータ環境をアップグレードします

Trident 21.01 以降 * からアップグレードするには、以下の手順に従ってください。

手順
  1. 現在の Astra Trident インスタンスのインストールに使用した Trident オペレータを削除たとえば、 21.01 からアップグレードする場合は、次のコマンドを実行します。

    kubectl delete -f 21.01/trident-installer/deploy/bundle.yaml -n trident
  2. (オプション)インストールパラメータを変更する場合は、を編集します TridentOrchestrator Tridentのインストール時に作成したオブジェクト。これには、カスタム Trident イメージの変更、コンテナイメージを抽出するためのプライベートイメージレジストリ、デバッグログの有効化、イメージのプルシークレットの指定などの変更が含まれます。

  3. を使用してAstra Tridentをインストールします bundle.yaml 新しいバージョンのTridentオペレータを設定するファイル。次のコマンドを実行します。

    kubectl create -f 21.10.0/trident-installer/deploy/bundle.yaml -n trident

このステップの一環として、 21.10.0 Trident オペレータが既存の Astra Trident インストールを特定し、オペレータと同じバージョンにアップグレードします。

名前空間を対象としたオペレータインストールをアップグレードします

名前空間を対象とした演算子(バージョン 20.07 ~ 20.10 )を使用してインストールされた Astra Trident のインスタンスからアップグレードするには、次の手順に従います。

手順
  1. 既存の Trident インストールのステータスを確認そのためには、の*ステータス*を確認してください TridentProvisioner。ステータスがになっている必要があります Installed

    kubectl describe tprov trident -n trident | grep Message: -A 3
    Message:  Trident installed
    Status:   Installed
    Version:  v20.10.1
    メモ ステータスがになっている場合 `Updating`をクリックし、続行する前に解決してください。可能なステータス値のリストについては、を参照してください "こちらをご覧ください"
  2. を作成します TridentOrchestrator Tridentインストーラに付属のマニフェストを使用したCRD。

    # Download the release required [21.01]
    mkdir 21.07.1
    cd 21.07.1
    wget https://github.com/NetApp/trident/releases/download/v21.07.1/trident-installer-21.07.1.tar.gz
    tar -xf trident-installer-21.07.1.tar.gz
    cd trident-installer
    kubectl create -f deploy/crds/trident.netapp.io_tridentorchestrators_crd_post1.16.yaml
  3. マニフェストを使用して、名前空間を対象とした演算子を削除します。この手順を完了するには、が必要です bundle.yaml 名前空間を対象とした演算子を配備するために使用するファイル。を取得できます bundle.yaml から "Trident リポジトリ"。適切なブランチを使用するようにしてください。

    メモ Tridentのインストールパラメータに必要な変更を加えます(の値の変更など) tridentImageautosupportImage、プライベートイメージリポジトリ、および提供 imagePullSecrets)名前空間を対象とした演算子を削除した後、クラスタを対象とした演算子をインストールする前。更新可能なパラメータの一覧については、を参照してください "パラメータのリスト"
    #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
    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

    この段階では、を実行します trident-operator-xxxxxxxxxx-xxxxx ポッドが削除されました。

  4. (オプション)インストールパラメータを変更する必要がある場合は、を更新します TridentProvisioner 仕様これらの変更には、コンテナイメージをからプルするためのプライベートイメージレジストリの変更、デバッグログの有効化、イメージプルシークレットの指定などがあります。

    kubectl patch tprov <trident-provisioner-name> -n <trident-namespace> --type=merge -p '{"spec":{"debug":true}}'
  5. クラスタを対象とした演算子をインストールします。

    メモ クラスタを対象としたオペレータをインストールすると、の移行が開始されます TridentProvisioner オブジェクトの移動先 TridentOrchestrator オブジェクトを削除します TridentProvisioner オブジェクトと tridentprovisioner CRD、およびAstra Tridentを、使用しているクラスタ対象オペレータのバージョンにアップグレードします。次の例では、 Trident が 21.07.1 にアップグレードされています。
    重要 クラスタを対象としたオペレータを使用してAstra Tridentをアップグレードすると、が移行されます tridentProvisioner をに追加します tridentOrchestrator 同じ名前のオブジェクト。これは、オペレータによって自動的に処理されます。アップグレードの際には、 Astra Trident が以前と同じネームスペースにインストールされる予定です。
    #Ensure you are in the correct directory
    pwd
    /root/21.07.1/trident-installer
    
    #Install 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
    
    #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 Trident pods in the namespace
    kubectl get pods -n trident
    NAME                                READY   STATUS    RESTARTS   AGE
    trident-csi-79df798bdc-m79dc        6/6     Running   0          1m41s
    trident-csi-xrst8                   2/2     Running   0          1m41s
    trident-operator-5574dbbc68-nthjv   1/1     Running   0          1m52s
    
    #Confirm Trident has been updated to the desired version
    kubectl describe torc trident | grep Message -A 3
    Message:                Trident installed
    Namespace:              trident
    Status:                 Installed
    Version:                v21.07.1

Helm ベースのオペレータインストレーションをアップグレードします

Helm ベースのオペレータインストレーションをアップグレードするには、次の手順を実行します。

手順
  1. 最新の Astra Trident リリースをダウンロード

  2. を使用します helm upgrade コマンドを実行します次の例を参照してください。

    helm upgrade <name> trident-operator-21.07.1.tgz

    ここで、 trident-operator-21.07.1.tgz アップグレード後のバージョンが反映されます。

  3. を実行します helm list グラフとアプリのバージョンが両方ともアップグレードされていることを確認します。

メモ アップグレード中に構成データを渡すには、を使用します --set

たとえば、のデフォルト値を変更するには、のように指定します `tridentDebug`を使用して、次のコマンドを実行します。

helm upgrade <name> trident-operator-21.07.1-custom.tgz --set tridentDebug=true

を実行した場合 `tridentctl logs`デバッグメッセージが表示されます。

メモ 初期インストール時にデフォルト以外のオプションを設定する場合は、オプションが upgrade コマンドに含まれていることを確認してください。含まれていない場合は、値がデフォルトにリセットされます。

オペレータ以外のインストールからアップグレードします

CSI Trident インスタンスが上記の前提条件を満たしている場合は、 Trident オペレータの最新リリースにアップグレードできます。

手順
  1. 最新の Astra Trident リリースをダウンロード

    # Download the release required [21.07.1]
    mkdir 21.07.1
    cd 21.07.1
    wget https://github.com/NetApp/trident/releases/download/v21.07.1/trident-installer-21.07.1.tar.gz
    tar -xf trident-installer-21.07.1.tar.gz
    cd trident-installer
  2. を作成します tridentorchestrator マニフェストからのCRD。

    kubectl create -f deploy/crds/trident.netapp.io_tridentorchestrators_crd_post1.16.yaml
  3. オペレータを配備します。

    #Install 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-csi-79df798bdc-m79dc        6/6     Running   0          150d
    trident-csi-xrst8                   2/2     Running   0          150d
    trident-operator-5574dbbc68-nthjv   1/1     Running   0          1m30s
  4. を作成します TridentOrchestrator Astra Tridentのインストール用にCR。

    #Create a tridentOrchestrator to initate a Trident install
    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 desired version
    kubectl describe torc trident | grep Message -A 3
    Message:                Trident installed
    Namespace:              trident
    Status:                 Installed
    Version:                v21.07.1

既存のバックエンドと PVC は自動的に使用可能