Removing OpenShift Serverless
Removing Serverless from your cluster
Abstract
Chapter 1. Removing {ServerlessProductName} overview
If you need to remove OpenShift Serverless from your cluster, you can do so by manually removing the OpenShift Serverless Operator and other OpenShift Serverless components. Before you can remove the OpenShift Serverless Operator, you must remove Knative Serving and Knative Eventing.
After uninstalling the OpenShift Serverless, you can remove the Operator and API custom resource definitions (CRDs) that remain on the cluster.
To fully remove OpenShift Serverless, complete the following procedures:
Chapter 2. Uninstalling OpenShift Serverless Knative Eventing
Before you can remove the OpenShift Serverless Operator, you must remove Knative Eventing. To uninstall Knative Eventing, you must remove the KnativeEventing custom resource (CR) and delete the knative-eventing namespace.
2.1. Uninstalling Knative Eventing
You can uninstall Knative Eventing from your cluster by deleting the KnativeEventing custom resource and its namespace. This removes all event-driven components, channels, brokers, and event sources from the cluster.
Prerequisites
- You have cluster administrator permissions on OpenShift Container Platform, or you have cluster or dedicated administrator permissions on OpenShift Dedicated.
-
You have installed the OpenShift CLI (
oc).
Procedure
Delete the
KnativeEventingCR:$ oc delete knativeeventings.operator.knative.dev knative-eventing -n knative-eventing
After the command has completed and all pods have been removed from the
knative-eventingnamespace, delete the namespace:$ oc delete namespace knative-eventing
Chapter 3. Uninstalling OpenShift Serverless Knative Serving
Before you can remove the OpenShift Serverless Operator, you must remove Knative Serving. To uninstall Knative Serving, you must remove the KnativeServing custom resource (CR) and delete the knative-serving namespace.
3.1. Uninstalling Knative Serving
You can uninstall Knative Serving from your cluster by deleting the KnativeServing custom resource and its namespace. This removes all serverless application components and services from the cluster.
Prerequisites
- You have cluster administrator permissions on OpenShift Container Platform, or you have cluster or dedicated administrator permissions on OpenShift Dedicated.
-
You have installed the OpenShift CLI (
oc).
Procedure
Delete the
KnativeServingCR:$ oc delete knativeservings.operator.knative.dev knative-serving -n knative-serving
After the command has completed and all pods have been removed from the
knative-servingnamespace, delete the namespace:$ oc delete namespace knative-serving
Chapter 4. Removing the OpenShift Serverless Operator
After you have removed Knative Serving and Knative Eventing, you can remove the OpenShift Serverless Operator. You can do this by using the web console or the oc CLI.
4.1. Additional resources
Chapter 5. Removing the OpenShift Serverless Logic Operator
If you need to remove OpenShift Serverless Logic from your cluster, you can do so by manually removing the OpenShift Serverless Logic Operator and other OpenShift Serverless Logic components.
You can delete the OpenShift Serverless Logic Operator by using the web console.
5.1. Additional resources
Chapter 6. Deleting OpenShift Serverless custom resource definitions
After uninstalling the OpenShift Serverless, the Operator and API custom resource definitions (CRDs) remain on the cluster. You can use the following procedure to remove the remaining CRDs.
6.1. Removing OpenShift Serverless Operator and API CRDs
Delete the Operator and API Custom Resource Definitions (CRD) by using the following procedure.
Removing the Operator and custom resource definitions (CRDs) also removes all resources that you defined by using them, including Knative services.
Prerequisites
-
Install the OpenShift CLI (
oc). - You have cluster administrator permissions on OpenShift Container Platform, or you have cluster or dedicated administrator permissions on Red Hat OpenShift Service on AWS or OpenShift Dedicated.
- You have uninstalled Knative Serving and removed the OpenShift Serverless Operator.
Procedure
To delete the remaining OpenShift Serverless CRDs, enter the following command:
$ oc get crd -oname | grep 'knative.dev' | xargs oc delete