删除 Serverless

Red Hat OpenShift Serverless 1.29

从集群中移除 Serverless

Red Hat OpenShift Documentation Team

摘要

本文档详细介绍了如何从集群中删除 OpenShift Serverless。

第 1 章 删除 OpenShift Serverless 概述

如果需要从集群中删除 OpenShift Serverless,您可以手动删除 OpenShift Serverless Operator 和其他 OpenShift Serverless 组件。在删除 OpenShift Serverless Operator 之前,您必须删除 Knative Serving 和 Knative Eventing。

卸载 OpenShift Serverless 后,您可以删除集群中剩余的 Operator 和 API 自定义资源定义 (CRD)。

以下流程中详细介绍了完全删除 OpenShift Serverless 的步骤:

第 2 章 卸载 OpenShift Serverless Knative Eventing

在删除 OpenShift Serverless Operator 之前,您必须删除 Knative Eventing。要卸载 Knative Eventing,您必须删除 KnativeEventing 自定义资源 (CR) 并删除 knative-eventing 命名空间。

2.1. 卸载 Knative Eventing

先决条件

  • 在 OpenShift Container Platform 上具有集群管理员权限,或者在 OpenShift Dedicated 上具有集群或专用管理员权限。
  • 安装 OpenShift CLI (oc) 。

流程

  1. 删除 KnativeEventing CR:

    $ oc delete knativeeventings.operator.knative.dev knative-eventing -n knative-eventing
  2. 在该命令运行完成且已从 knative-eventing 命名空间中移除所有 Pod 后,删除命名空间:

    $ oc delete namespace knative-eventing

第 3 章 卸载 OpenShift Serverless Knative Serving

在删除 OpenShift Serverless Operator 之前,您必须删除 Knative Serving。要卸载 Knative Serving,您必须删除 KnativeServing 自定义资源 (CR) 并删除 knative-serving 命名空间。

3.1. 卸载 Knative Serving

先决条件

  • 在 OpenShift Container Platform 上具有集群管理员权限,或者在 OpenShift Dedicated 上具有集群或专用管理员权限。
  • 安装 OpenShift CLI (oc) 。

流程

  1. 删除 KnativeServing CR:

    $ oc delete knativeservings.operator.knative.dev knative-serving -n knative-serving
  2. 在该命令运行完成且已从 knative-serving 命名空间中移除所有 Pod 后,删除命名空间:

    $ oc delete namespace knative-serving

第 4 章 删除 OpenShift Serverless Operator

删除 Knative Serving 和 Knative Eventing 后,您可以删除 OpenShift Serverless Operator。您可以使用 Web 控制台或 oc CLI 完成此操作。

第 5 章 删除 OpenShift Serverless 自定义资源定义

卸载 OpenShift Serverless 后,Operator 和 API 自定义资源定义(CRD)会保留在集群中。您可以使用以下步骤删除剩余的 CRD。

重要

移除 Operator 和 API CRD 也会移除所有使用它们定义的资源,包括 Knative 服务。

5.1. 删除 OpenShift Serverless Operator 和 API CRD

使用以下步骤删除 Operator 和 API CRD。

先决条件

  • 安装 OpenShift CLI (oc) 。
  • 在 OpenShift Container Platform 上具有集群管理员权限,或在 Red Hat OpenShift Service on AWS 或 OpenShift Dedicated 上具有集群或专用管理员权限。
  • 您已卸载了 Knative Serving 并移除了 OpenShift Serverless Operator。

流程

  • 运行以下命令删除 OpenShift Serverless CRD:

    $ oc get crd -oname | grep 'knative.dev' | xargs oc delete

法律通告

Copyright © 2023 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.