polardbxoperatordocs/ops/lifecycle/2-delete.md

23 lines
657 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

使用下面的命令删除 PolarDBXCluster 集群(对象),其中 `polardbx-test` 是 PolarDBXCluster 对象名
```bash
kubectl delete pxc polardbx-test
```
此时查看对象状态可能会看到 `PHASE``Deleting`
```bash
kubectl get pxc polardbx-test
NAME GMS CN DN CDC PHASE DISK AGE
polardbx-test 1/1 2/2 2/2 2/2 Deleting 6.2Gi 2m1s
```
或者报错对象已经不存在
```bash
kubectl get pxc polardbx-test
Error from server (NotFound): polardbxclusters.polardbx.aliyun.com "polardbx-test" not found
```
当 PolarDBXCluster 主实例被删除时,其附属的只读实例也会随之删除