TimesTenデータベースの削除

レプリケートされたTimesTenClassicオブジェクトおよびレプリケートされないTimesTenClassicオブジェクトをアンインストールできます。これにより、オブジェクトに関連付けられたTimesTenデータベースが削除されます。永続ボリューム要求(PVC)は自動的に削除されないため、手動で削除する必要があります。この例は、この方法を示しています。

  1. ネームスペースで実行されているTimesTenClassicオブジェクトを確認します。
    kubectl get ttc
    出力は、次のようになります。
    NAME              STATE              ACTIVE            AGE
    norepsamplehelm   AllReplicasReady   N/A               24h
    repsamplehelm     Normal             repsamplehelm-0   27h
    
  2. リリースをリストします。
     helm list

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

    
    NAME            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                   APP VERSION
    norepsamplehelm default         5               2024-08-05 15:09:42.959017268 +0000 UTC deployed        ttclassic-2211270.1.0   22.1.1.27.0
    repsamplehelm   default         3               2024-08-05 13:54:33.909336613 +0000 UTC deployed        ttclassic-2211270.1.0   22.1.1.27.0
    ttoper          default         3               2024-08-05 16:11:37.408437395 +0000 UTC deployed        ttoperator-2211270.1.0  22.1.1.27.0

    norepsamplehelmおよびrepsamplehelmリリースはネームスペースに存在します。

  3. レプリケートされたTimesTenClassicオブジェクトのリリースをアンインストールします。
    1. アンインストールします。
      helm uninstall repsamplehelm
      出力は次のようになります。
      release "repsamplehelm" uninstalled
    2. TimesTenClassicオブジェクトが存在しないことを確認します。
      kubectl get ttc repsamplehelm

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

      Error from server (NotFound): timestenclassics.timesten.oracle.com "repsamplehelm" not found
    3. ConfigMapが削除されていることを確認します。
      kubectl get configmap repsamplehelm
      出力は次のようになります。
      Error from server (NotFound): configmaps "repsamplehelm" not found
    4. PVCを削除します。
      kubectl get pvc

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

      NAME                              STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
      tt-persistent-repsamplehelm-0     Bound    csi-4ef3c13e-ae49-4604-8586-b78343142481   50Gi       RWO            oci-bv         28h
      tt-persistent-repsamplehelm-1     Bound    csi-6786e82d-0bde-458f-8acd-047308e391a0   50Gi       RWO            oci-bv         28h
      ...

      削除します:

      kubectl delete pvc tt-persistent-repsamplehelm-0
      kubectl delete pvc tt-persistent-repsamplehelm-1
  4. レプリケートされないTimesTenClassicオブジェクトのリリースをアンインストールします。
    1. アンインストールします。
      helm uninstall norepsamplehelm
      出力は次のようになります。
      release "norepsamplehelm" uninstalled
    2. TimesTenClassicオブジェクトが存在しないことを確認します。
      kubectl get ttc norepsamplehelm

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

      Error from server (NotFound): timestenclassics.timesten.oracle.com "norepsamplehelm" not found
    3. ConfigMapが削除されていることを確認します。
      kubectl get configmap repsamplehelm
      出力は次のようになります。
      Error from server (NotFound): configmaps "norepsamplehelm" not found
    4. PVCを削除します。
      kubectl get pvc

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

      NAME                              STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
      tt-persistent-norepsamplehelm-0   Bound    csi-b5302a0c-f533-418e-a152-a9399ed2be7b   50Gi       RWO            oci-bv         25h
      tt-persistent-norepsamplehelm-1   Bound    csi-cb4b0e04-16f1-4e87-a952-781ac213ff77   50Gi       RWO            oci-bv         25h
      tt-persistent-norepsamplehelm-2   Bound    csi-353d4f18-50fe-4bd6-8d57-fe17b973e0be   50Gi       RWO            oci-bv         25h

      削除します:

      kubectl delete pvc tt-persistent-norepsamplehelm-0
      kubectl delete pvc tt-persistent-norepsamplehelm-1
      kubectl delete pvc tt-persistent-norepsamplehelm-2
TimesTenClassicオブジェクトおよび関連付けられたデータベースがネームスペースから正常に削除されました。