TimesTenオペレータの削除

TimesTenオペレータはネームスペースから削除できます。

TimesTenオペレータを削除するオプションがあります。operator.yamlおよびservice_account.yaml YAMLマニフェスト・ファイルが開発ホストに存在する場合は、これらのファイルを使用してTimesTenオペレータとそのサービス・アカウントを削除できます。それ以外の場合は、timesten-operatorデプロイメントおよびtimesten-operator role bindingroleおよびservice accountオブジェクトを削除できます。

次の例では、両方のオプションを実行する方法を示します:

  1. オプション: TimesTenオペレータが実行中であることを確認します。
    kubectl get pods
    出力は、次のようになります。
    NAME                                 READY   STATUS    RESTARTS   AGE
    timesten-operator-545d5f7fdb-xbdfw   1/1     Running   0          18h
  2. TimesTenオペレータの削除2つの選択肢があります。いずれかを選択します。
    • operator.yamlファイルを使用するには、YAMLマニフェスト・ファイルの場所に変更します。次に、TimesTenオペレータを削除します。

      cd kube_files/deploy
      kubectl delete -f operator.yaml
      出力は次のようになります。
      deployment.apps "timesten-operator" deleted
    • TimesTenオペレータ・デプロイメントを削除するには、次を実行します:
      kubectl delete deployment timesten-operator
      出力は次のようになります。
      deployment.apps "timesten-operator" deleted
  3. TimesTenオペレータのサービス・アカウント、ロールおよびロール・バインディングを削除します。2つの選択肢があります。いずれかを選択します。
    • service_account.yamlファイルを使用するには、YAMLマニフェスト・ファイルの場所に移動します。次に、サービス・アカウント、ロールおよびロール・バインディングを削除します。

      cd kube_files/deploy
      kubectl delete -f service_account.yaml
      出力は次のようになります。
      role.rbac.authorization.k8s.io "timesten-operator" deleted
      serviceaccount "timesten-operator" deleted
      rolebinding.rbac.authorization.k8s.io "timesten-operator" deleted
      
    • service_account.yamlファイルを使用せずにサービス・アカウント、ロールおよびロール・バインディング・オブジェクトを削除するには:
      kubectl delete serviceaccount timesten-operator
      kubectl delete role timesten-operator
      kubectl delete rolebinding timesten-operator
おめでとうございます。TimesTenオペレータおよびサービス・アカウントが正常に削除されました。