搜索

13.5. 从集群中删除 OpenShift Update Service

download PDF

要从集群中删除 OpenShift Update Service (OSUS) 的本地副本,您必须首先删除 OSUS 应用程序,然后卸载 OSUS Operator。

13.5.1. 删除 OpenShift Update Service 应用程序

您可以使用 OpenShift Container Platform Web 控制台或 CLI 删除 OpenShift Update Service 应用程序。

13.5.1.1. 使用 Web 控制台删除 OpenShift Update Service 应用程序

您可以使用 OpenShift Container Platform Web 控制台使用 OpenShift Update Service Operator 删除 OpenShift Update Service 应用程序。

先决条件

  • 已安装 OpenShift Update Service Operator。

流程

  1. 在 Web 控制台中,点 Operators Installed Operators
  2. 从安装的 Operator 列表中选择 OpenShift Update Service
  3. Update Service 选项卡。
  4. 从安装的 OpenShift Update Service 应用列表中,选择要删除的应用,然后单击 Delete UpdateService
  5. Delete UpdateService? 确认对话框中,单击 Delete 以确认删除。

13.5.1.2. 使用 CLI 删除 OpenShift Update Service 应用程序

您可以使用 OpenShift CLI(oc)删除 OpenShift Update Service 应用。

流程

  1. 使用 OpenShift Update Service 应用程序在其中创建的命名空间获取 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 应用程序,如 openshift-update-service

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

    输出示例

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

13.5.2. 卸载 OpenShift Update Service Operator

您可以使用 OpenShift Container Platform Web 控制台或 CLI 卸载 OpenShift Update Service Operator。

13.5.2.1. 使用 Web 控制台卸载 OpenShift Update Service Operator

您可以使用 OpenShift Container Platform Web 控制台卸载 OpenShift Update Service Operator。

先决条件

  • 所有 OpenShift Update Service 应用都已删除。

流程

  1. 在 Web 控制台中,点 Operators Installed Operators
  2. 从安装的 Operator 列表中选择 OpenShift Update Service 并点 Uninstall Operator
  3. Uninstall Operator? 确认对话框中点 Uninstall 确认卸载。

13.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

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.