12.5. クラスターからの OpenShift Update Service のアンインストール

OpenShift Update Service (OSUS) のローカルコピーをクラスターから削除するには、最初に OSUS アプリケーションを削除してから、OSUS Operator をアンインストールする必要があります。

12.5.1. OpenShift Update Service アプリケーションの削除

OpenShift Container Platform Web コンソールまたは CLI を使用して OpenShift Update Service アプリケーションを削除できます。

12.5.1.1. Web コンソールを使用した OpenShift Update Service アプリケーションの削除

OpenShift Container Platform Web コンソールを使用して、OpenShift Update Service Operator で OpenShift Update Service アプリケーションを削除できます。

前提条件

  • OpenShift Update Service Operator がインストールされている。

手順

  1. Web コンソールで OperatorsInstalled Operators をクリックします。
  2. インストールされた Operator の一覧から OpenShift Update Service を選択します。
  3. Update Service タブをクリックします。
  4. インストールされた OpenShift Update Service アプリケーションの一覧から、削除するアプリケーションを選択して、Delete UpdateService をクリックします。
  5. Delete UpdateService? 確認ダイアログで、Delete をクリックし、削除を確定します。

12.5.1.2. CLI を使用した OpenShift Update Service アプリケーションの削除

OpenShift CLI (oc) を使用して、OpenShift Update Service アプリケーションを削除できます。

手順

  1. OpenShift Update Service アプリケーションを作成した namespace を使用して OpenShift Update Service アプリケーション名を取得します (例: openshift-update-service)。

    $ oc get updateservice -n openshift-update-service

    出力例

    NAME      AGE
    service   6s

  2. 直前の手順の NAME の値を使用して OpenShift Update Service アプリケーションと、OpenShift Update Service アプリケーションを作成した namespace (例: openshift-update-service) を削除します。

    $ oc delete updateservice service -n openshift-update-service

    出力例

    updateservice.updateservice.operator.openshift.io "service" deleted

12.5.2. OpenShift Update Service Operator のアンインストール

OpenShift Container Platform Web コンソールまたは CLI を使用して、OpenShift Update Service Operator をアンインストールできます。

12.5.2.1. Web コンソールを使用した OpenShift Update Service Operator のアンインストール

OpenShift Container Platform Web コンソールを使用して OpenShift Update Service Operator をアンインストールすることができます。

前提条件

  • OpenShift Update Service アプリケーションがすべて削除されている。

手順

  1. Web コンソールで OperatorsInstalled Operators をクリックします。
  2. インストールされた Operator の一覧から OpenShift Update Service を選択し、Uninstall Operator をクリックします。
  3. Uninstall Operator? 確認ダイアログから Uninstall をクリックし、アンインストールを確定します。

12.5.2.2. CLI を使用した OpenShift Update Service Operator のアンインストール

OpenShift CLI (oc) を使用して、OpenShift Update Service Operator をアンインストールできます。

前提条件

  • OpenShift Update Service アプリケーションがすべて削除されている。

手順

  1. OpenShift Update Service Operator (例: openshift-update-service) が含まれるプロジェクトに切り替えます。

    $ oc project openshift-update-service

    出力例

    Now using project "openshift-update-service" on server "https://example.com:6443".

  2. OpenShift Update Service Operator Operator グループの名前を取得します。

    $ oc get operatorgroup

    出力例

    NAME                             AGE
    openshift-update-service-fprx2   4m41s

  3. Operator グループを削除します (例: openshift-update-service-fprx2)。

    $ oc delete operatorgroup openshift-update-service-fprx2

    出力例

    operatorgroup.operators.coreos.com "openshift-update-service-fprx2" deleted

  4. OpenShift Update Service Operator サブスクリプションの名前を取得します。

    $ oc get subscription

    出力例

    NAME                      PACKAGE                   SOURCE                        CHANNEL
    update-service-operator   update-service-operator   updateservice-index-catalog   v1

  5. 直前の手順で Name の値を使用して、currentCSV フィールドで、サブスクライブされた OpenShift Update Service Operator の現行バージョンを確認します。

    $ oc get subscription update-service-operator -o yaml | grep " currentCSV"

    出力例

      currentCSV: update-service-operator.v0.0.1

  6. サブスクリプション (例: update-service-operator) を削除します。

    $ oc delete subscription update-service-operator

    出力例

    subscription.operators.coreos.com "update-service-operator" deleted

  7. 直前の手順の currentCSV 値を使用し、OpenShift Update Service Operator の CSV を削除します。

    $ oc delete clusterserviceversion update-service-operator.v0.0.1

    出力例

    clusterserviceversion.operators.coreos.com "update-service-operator.v0.0.1" deleted