1.10. 在重新安装前清理工件
在安装以前的版本的集群中重新安装 Red Hat Advanced Cluster Management for Kubernetes 前,您需要删除工件。
需要的访问权限:集群管理员
OpenShift Container Platform Dedicated 环境需要访问权限:您必须具有 cluster-admin
权限。
1.10.1. 清理工件
运行清理脚本删除所有保留的工件。如果您计划在同一集群中使用旧版本的 Red Hat Advanced Cluster Management 重新安装 Red Hat Advanced Cluster Management,则需要清理工件。
将以下脚本复制到一个文件中,将脚本中的 &
lt;namespace
> 值替换为之前安装 Red Hat Advanced Cluster Management 的命名空间的名称。重要: 确保指定正确的命名空间,因为在运行脚本时也会清理和删除命名空间。
ACM_NAMESPACE=<namespace> oc delete mch --all -n $ACM_NAMESPACE oc delete apiservice v1.admission.cluster.open-cluster-management.io v1.admission.work.open-cluster-management.io oc delete clusterimageset --all oc delete clusterrole multiclusterengines.multicluster.openshift.io-v1-admin multiclusterengines.multicluster.openshift.io-v1-crdview multiclusterengines.multicluster.openshift.io-v1-edit multiclusterengines.multicluster.openshift.io-v1-view open-cluster-management:addons:application-manager open-cluster-management:admin-aggregate open-cluster-management:cert-policy-controller-hub open-cluster-management:cluster-manager-admin-aggregate open-cluster-management:config-policy-controller-hub open-cluster-management:edit-aggregate open-cluster-management:iam-policy-controller-hub open-cluster-management:policy-framework-hub open-cluster-management:view-aggregate oc delete crd klusterletaddonconfigs.agent.open-cluster-management.io placementbindings.policy.open-cluster-management.io policies.policy.open-cluster-management.io userpreferences.console.open-cluster-management.io discoveredclusters.discovery.open-cluster-management.io discoveryconfigs.discovery.open-cluster-management.io oc delete mutatingwebhookconfiguration ocm-mutating-webhook managedclustermutators.admission.cluster.open-cluster-management.io multicluster-observability-operator oc delete validatingwebhookconfiguration channels.apps.open.cluster.management.webhook.validator application-webhook-validator multiclusterhub-operator-validating-webhook ocm-validating-webhook multicluster-observability-operator multiclusterengines.multicluster.openshift.io
- 运行脚本。当您收到没有找到资源的消息时,您可以继续安装。