卸载

卸载 Alauda AI Infrastructure NPU Management 会移除产品管理的控制器和 NPU 组件。现有工作负载不会因此自动变得可移植到非 NPU 节点。

本页中的命令使用默认的 Operator 命名空间 npu-operator。如果 Operator 安装在其他命名空间,请将 npu-operator 替换为该命名空间。

卸载前

  1. 停止或迁移请求 NPU 资源的工作负载,例如 huawei.com/Ascend910、huawei.com/Ascend310P,或已安装设备插件报告的其他 huawei.com/Ascend* 键。
  2. 记录当前的 NPUOperatorCtl YAML。
  3. 检查主机驱动程序是由 operator 管理,还是通过其他方式安装。
  4. 检查是否需要保留 ACP 配额元数据或仪表板,以便稍后重新安装。

卸载流程

  1. 删除 NPUOperatorCtl 实例。请在移除 Operator 之前执行此操作:Operator 必须保持运行,才能移除 NPUClusterPolicy 及其管理的组件。
  2. 等待产品管理的 DaemonSet 和 Pod 被移除。在 Ascend 310P 上的验证中,策略和所有组件都在几秒内消失,且没有残留 finalizer。
  3. 从 OperatorHub 卸载 Alauda AI Infrastructure NPU Management。这会移除 Subscription 和 ClusterServiceVersion。
  4. 确认没有其他产品依赖 NPU 专用节点标签后,再将其移除。
  5. 如果不再使用,请移除产品专用的仪表板或告警。

驱动程序清理

移除 operator 管理的驱动程序 Pod 后,主机上已加载的内核模块可能会继续保持加载状态,直到节点重启。若要彻底清除主机上的驱动程序状态,请计划在卸载后重启节点。

除非运维计划明确涵盖驱动程序生命周期,否则请勿手动移除供应商驱动程序文件或固件。

验证卸载

kubectl -n npu-operator get pods
kubectl -n npu-operator get daemonset ascend-device-plugin --ignore-not-found
kubectl -n kube-system get daemonset ascend-device-plugin --ignore-not-found
kubectl -n npu-exporter get daemonset npu-exporter --ignore-not-found
kubectl -n npu-exporter get servicemonitor npu-exporter-servicemonitor --ignore-not-found
kubectl -n mindx-dl get deployment ascend-operator-manager clusterd resilience-controller --ignore-not-found
kubectl -n mindx-dl get daemonset noded --ignore-not-found
kubectl -n default get daemonset mindio-tft mindio-acp --ignore-not-found
kubectl get node ${nodeName} -o jsonpath='{.status.allocatable}'

所有组件命名空间中的产品工作负载都应已消失。移除 Device Plugin 且 kubelet 报告更新后的节点状态后,NPU 可分配资源应消失。

第二条 ascend-device-plugin 命令会检查 kube-system,v26.6.0 曾在此运行 Device Plugin。只有从 v26.6.0 升级且未执行所需清理的集群才会返回 DaemonSet。

卸载后仍保留的对象

卸载会移除工作负载、ascend RuntimeClass、NodeFeatureRule、准入 Webhook 配置、ServiceMonitor 以及组件 ClusterRole。以下对象会保留。它们不会阻止后续安装;仅当您希望彻底清理时才将其移除。

对象位置使用以下命令移除
CRD npuoperatorctls.npu-operator.alauda.io、npuclusterpolicies.npu.openfuyao.com、ascendjobs.mindxdl.gitee.com、hypernodes.topology.volcano.sh集群kubectl delete crd <name>
空命名空间 npu-operator 和 npu-exporter;如果曾启用这些组件,还包括 mindx-dl 和 volcano-system集群kubectl delete namespace <name>
Webhook 证书 Secret npu-pod-webhook-serving-certOperator 命名空间随命名空间移除
ConfigMap mindx-dl-deviceinfo-<node-name>,每个 NPU 节点一个kube-systemkubectl -n kube-system delete configmap mindx-dl-deviceinfo-<node-name>
ConfigMap vcjob-fault-npu-cm,如果已启用 Volcanovolcano-system随命名空间移除
节点标签 openfuyao.com/npu.present、openfuyao.com/container.runtime、accelerator、servertype、huawei.com/driver.versionNPU 节点;每个节点上的 openfuyao.com/container.runtimekubectl label node <node-name> <label-key>-

删除 CRD 会删除该类型的所有资源。仅当集群中没有其他 Volcano 或 MindCluster 安装使用这些 CRD 时,才删除 hypernodes.topology.volcano.sh 和 ascendjobs.mindxdl.gitee.com CRD。只有确认没有其他产品(例如 HAMi)依赖这些节点标签后,才能移除节点标签。