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,则需要清理工件。

  1. 确保您的 Red Hat OpenShift Container Platform CLI 被配置为运行 oc 命令。如需有关如何配置 oc 命令的更多信息,请参阅 OpenShift Container Platform 文档中的 OpenShift CLI 入门。
  2. 将以下脚本复制到一个文件中,将脚本中的 & 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 open-cluster-management:cert-policy-controller open-cluster-management:cluster-manager-admin open-cluster-management:config-policy-controller open-cluster-management:endpoint-observability-operator open-cluster-management:governance-policy-framework open-cluster-management:governance-policy-framework-kube-rbac-proxy 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: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
    Copy to Clipboard Toggle word wrap
  3. 运行脚本。当您收到没有找到资源的消息时,您可以继续安装。
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat