1.27.3. 清理 Operator 资源
您可以使用 OpenShift Container Platform Web 控制台手动删除 Red Hat OpenShift Service Mesh Operator 后保留的资源。
先决条件
-
具有集群管理访问权限的帐户。如果使用 Red Hat OpenShift Dedicated,则必须有一个具有
dedicated-admin
角色的帐户。 -
访问 OpenShift Container Platform 命令行界面 (CLI) 也称为
oc
。
流程
- 以集群管理员身份登录到 OpenShift Container Platform CLI。
在卸载 Operators 后运行以下命令清理资源。如果您要在没有服务网格的情况下将分布式追踪平台用作独立服务,请不要删除 Jaeger 资源。
注意OpenShift Elasticsearch Operator 默认安装在
openshift-operators-redhat
中。其他 Operator 默认安装在openshift-operators
命名空间中。如果在另一个命名空间中安装了 Operator,将openshift-operators
替换为安装了 Red Hat OpenShift Service Mesh Operator 的项目的名称。$ oc delete validatingwebhookconfiguration/openshift-operators.servicemesh-resources.maistra.io
$ oc delete mutatingwebhookconfiguration/openshift-operators.servicemesh-resources.maistra.io
$ oc delete svc maistra-admission-controller -n openshift-operators
$ oc -n openshift-operators delete ds -lmaistra-version
$ oc delete clusterrole/istio-admin clusterrole/istio-cni clusterrolebinding/istio-cni
$ oc delete clusterrole istio-view istio-edit
$ oc delete clusterrole jaegers.jaegertracing.io-v1-admin jaegers.jaegertracing.io-v1-crdview jaegers.jaegertracing.io-v1-edit jaegers.jaegertracing.io-v1-view
$ oc get crds -o name | grep '.*\.istio\.io' | xargs -r -n 1 oc delete
$ oc get crds -o name | grep '.*\.maistra\.io' | xargs -r -n 1 oc delete
$ oc get crds -o name | grep '.*\.kiali\.io' | xargs -r -n 1 oc delete
$ oc delete crds jaegers.jaegertracing.io
$ oc delete cm -n openshift-operators maistra-operator-cabundle
$ oc delete cm -n openshift-operators istio-cni-config
$ oc delete sa -n openshift-operators istio-cni