2.12.2.2. 清理 Operator 资源
在使用 OpenShift Container Platform Web 控制台删除 Red Hat OpenShift Service Mesh Operator 后,按照以下步骤手动删除遗留的资源。
先决条件
- 具有集群管理访问权限的帐户。
-
访问 OpenShift Container Platform 命令行界面 (CLI) 也称为
oc
。
流程
- 以集群管理员身份登录到 OpenShift Container Platform CLI。
在卸载 Operators 后运行以下命令清理资源。如果您希望继续使用 Jaeger 作为没有 service mesh 的独立服务,请不要删除 Jaeger 资源。
注意默认情况下,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 -n openshift-operators daemonset/istio-node
$ 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 svc admission-controller -n <operator-project>
$ oc delete project <istio-system-project>