本文介绍注册集群卸载相关内容。
注册集群卸载时,如未清理已安装组件,可按如下步骤手动清理。
ack-cluster-agent组件
如果您依旧还保留着部署ack-cluster-agent组件时的agent.yaml文件,则执行:
kubectl delete -f agent.yaml
如未保留部署编排文件,则可依照以下命令清理资源:
kubectl -nkube-system delete deploy ack-cluster-agent
kubectl -nkube-system delete clusterrole,clusterrolebinding -l ack/creator=ack
kubectl -nkube-system delete secret $(kubectl -nkube-system get secret |grep ack-credentials |cut -d " " -f1)
kubectl -nkube-system delete secret $(kubectl -nkube-system get secret |grep ack-token |cut -d " " -f1)
kubectl -nkube-system delete sa ack
kubectl -nkube-system delete cm alibaba-log-configuration ack-agent-config provider
alicloud-monitor-controller组件
请在卸载注册集群之前通过控制台组件管理页面卸载alicloud-monitor-controller组件。
如未通过控制台卸载,则可依照以下命令清理资源:
kubectl -nkube-system delete deploy,clusterrolebinding,clusterrole,sa -l k8s-app=alicloud-monitor-controller
kubectl delete crd ackalertrules.alert.alibabacloud.com