删除实例

待删除资源

删除实例时,会自动移除实例创建的所有可安全删除的资源,如 StatefulSets、Deployments、ConfigMaps、Secrets 和 Services。可能包含重要数据的特殊资源需要手动删除,例如 PersistentVolumeClaims 以及与 MySQL-MGR 相关的备份资源,具体包括 mysqlbackups.mysql.middleware.alauda.io 及其相关的实际数据。

目录

操作步骤

CLI
Web Console
  1. 删除实例
kubectl delete mysql -n ${namespace} ${name}
  1. 清理持久化数据
kubectl get pvc -n ${namespace} -l v1alpha1.mysql.middleware.alauda.io/cluster=${name} -o name | xargs kubectl delete -n ${namespace}