レプリケートされたTimesTenClassicオブジェクトの変更

レプリケートされたTimesTenClassicオブジェクトを変更します。
  1. ネームスペースで実行されているTimesTenClassicオブジェクトを確認します。
    kubectl get ttc

    出力は、次のようになります。

    NAME             STATE              ACTIVE           AGE
    mannorepsample   AllReplicasReady   N/A              30h
    manrepsample     Normal             manrepsample-0   54m
    norepsample      AllReplicasReady   N/A              21h
    repsample        Normal             repsample-0      50m

    ネームスペースで実行されているTimesTenClassicオブジェクトがいくつかあります。レプリケートされたTimesTenClassicオブジェクトの1つはmanrepsampleです。高レベル状態はNormalで、アクティブ・スタンバイ・ペアのTimesTenデータベースが稼働中であり、正しく機能していることを示します。

  2. オブジェクトのイメージ・アップグレード・ストラテジを確認します。
    kubectl get ttc manrepsample -o yaml | grep imageUpgradeStrategy

    出力は次のようになります。

    imageUpgradeStrategy: Manual

    イメージ・アップグレード・ストラテジはManualで、手動アップグレード・ストラテジを示します。

  3. 開発ホストで、アップグレードに使用するコンテナ・イメージを使用して、TimesTenClassicオブジェクトの.spec.ttspec.imageデータ項目を編集します。この例では、container-registry.oracle.com/timesten/timesten:22.1.1.28.0を使用します。
    1. ファイルを編集し、image値をcontainer-registry.oracle.com/timesten/timesten:22.1.1.28.0に置き換えます。
       kubectl edit ttc manrepsample
      
      # Please edit the object below. Lines beginning with a '#' will be ignored,
      # and an empty file will abort the edit. If an error occurs while saving this file will be
      # reopened with the relevant failures.
      #
      apiVersion: timesten.oracle.com/v2
      kind: TimesTenClassic
      ...
          image: container-registry.oracle.com/timesten/timesten:22.1.1.28.0
      ...
    2. ファイルを保存して、エディタを終了します。
  4. StatefulSetに新しいイメージが含まれていることを確認します。
    kubectl describe statefulset manrepsample | grep Image

    出力は次のようになります。

    Image:      container-registry.oracle.com/timesten/timesten:22.1.1.28.0
    Image:      container-registry.oracle.com/timesten/timesten:22.1.1.28.0
    Image:      container-registry.oracle.com/timesten/timesten:22.1.1.28.0
    Image:      container-registry.oracle.com/timesten/timesten:22.1.1.28.0

    TimesTenオペレータは、TimesTenClassicの.spec.ttspec.imageデータ項目への更新があることを検出すると、新しいイメージでStatefulSetを変更します。これはレプリケートされたTimesTenClassicオブジェクトの手動アップグレードであるため、TimesTenオペレータはこれ以降の処理を実行しません。これにより、手動アップグレードを開始できます。

TimesTenClassicオブジェクトが正常に変更されました。スタンバイ・データベースをアップグレードすることで手動アップグレードを続行しましょう。