1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/ossm-remove-cleanup.adoc
2025-01-23 05:06:25 +00:00

131 lines
4.0 KiB
Plaintext

// Module included in the following assemblies:
//
// * service_mesh/v2x/installing-ossm.adoc
:_mod-docs-content-type: PROCEDURE
[id="ossm-remove-cleanup_{context}"]
= Clean up Operator resources
You can manually remove resources left behind after removing the {SMProductName} Operator using the {product-title} web console.
.Prerequisites
* An account with cluster administration access. If you use {product-dedicated}, you must have an account with the `dedicated-admin` role.
* Access to the OpenShift CLI (`oc`).
.Procedure
ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
. Log in to the {product-title} CLI as a cluster administrator.
. Run the following commands to clean up resources after uninstalling the Operators. If you intend to keep using {JaegerShortName} as a stand-alone service without service mesh, do not delete the Jaeger resources.
+
[NOTE]
====
The OpenShift Elasticsearch Operator is installed in `openshift-operators-redhat` by default. The other Operators are installed in the `openshift-operators` namespace by default. If you installed the Operators in another namespace, replace `openshift-operators` with the name of the project where the {SMProductName} Operator was installed.
====
+
[source,terminal]
----
$ oc -n openshift-operators delete ds -lmaistra-version
----
+
[source,terminal]
----
$ oc delete clusterrole/istio-admin clusterrole/istio-cni clusterrolebinding/istio-cni clusterrole/ossm-cni clusterrolebinding/ossm-cni
----
+
[source,terminal]
----
$ oc delete clusterrole istio-view istio-edit
----
+
[source,terminal]
----
$ oc delete clusterrole jaegers.jaegertracing.io-v1-admin jaegers.jaegertracing.io-v1-crdview jaegers.jaegertracing.io-v1-edit jaegers.jaegertracing.io-v1-view
----
+
[source,terminal]
----
$ oc get crds -o name | grep '.*\.istio\.io' | xargs -r -n 1 oc delete
----
+
[source,terminal]
----
$ oc get crds -o name | grep '.*\.maistra\.io' | xargs -r -n 1 oc delete
----
+
[source,terminal]
----
$ oc get crds -o name | grep '.*\.kiali\.io' | xargs -r -n 1 oc delete
----
+
[source,terminal]
----
$ oc delete crds jaegers.jaegertracing.io
----
+
[source,terminal]
----
$ oc delete cm -n openshift-operators -lmaistra-version
----
+
[source,terminal]
----
$ oc delete sa -n openshift-operators -lmaistra-version
----
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
// Hiding in ROSA/OSD, dedicated-admins cannot delete resource "mutatingwebhookconfigurations" or "validatingwebhookconfigurations" or "customresourcedefinitions"
ifdef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
. Log in to the {product-title} CLI as a cluster administrator.
. Run the following commands to clean up resources after uninstalling the Operators. If you intend to keep using {JaegerShortName} as a stand-alone service without service mesh, do not delete the Jaeger resources.
+
[NOTE]
====
The OpenShift Elasticsearch Operator is installed in `openshift-operators-redhat` by default. The other Operators are installed in the `openshift-operators` namespace by default. If you installed the Operators in another namespace, replace `openshift-operators` with the name of the project where the {SMProductName} Operator was installed.
====
+
[source,terminal]
----
$ oc delete svc maistra-admission-controller -n openshift-operators
----
+
[source,terminal]
----
$ oc -n openshift-operators delete ds -lmaistra-version
----
+
[source,terminal]
----
$ oc delete clusterrole/istio-admin clusterrole/istio-cni clusterrolebinding/istio-cni
----
+
[source,terminal]
----
$ oc delete clusterrole istio-view istio-edit
----
+
[source,terminal]
----
$ oc delete clusterrole jaegers.jaegertracing.io-v1-admin jaegers.jaegertracing.io-v1-crdview jaegers.jaegertracing.io-v1-edit jaegers.jaegertracing.io-v1-view
----
+
[source,terminal]
----
$ oc delete cm -n openshift-operators maistra-operator-cabundle
----
+
[source,terminal]
----
$ oc delete cm -n openshift-operators istio-cni-config istio-cni-config-v2-3
----
+
[source,terminal]
----
$ oc delete sa -n openshift-operators istio-cni
----
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]