polardbxoperatordocs/ops/component/dn/6-dn-delete.md

30 lines
660 B
Markdown
Raw 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.

## Delete pod
执行如下命令直接删除 对应的 dn podk8s 会自动重建该 pod
```shell
kubectl delete pod {dn pod名}
```
## Graceful Shutdown
部分场景下我们需要对 DN 进行graceful的 shutdown然后重启可先执行如下命令关闭dn的探活
```shell
kubectl annotate pod {dn pod 名} runmode=debug
```
然后直接登录对应的 dn pod输入myc 命令进入 MySQL 命令行,执行如下命令:
```shell
mysql> shutdown;
```
即可重启 DN 的进程,此时 dn 的pod 不会重建。
搞完后记得执行如下命令打开探活:
```shell
kubectl annotate --overwrite pod {dn pod 名} runmode-
```