Delete pod
Execute the following command to delete the corresponding dn pod directly, and k8s will automatically rebuild the pod:
kubectl delete pod {dn pod name}
Graceful Shutdown
In some scenarios, we need to perform a graceful shutdown of DN and then restart it. First, execute the following command to turn off the liveness probe of dn:
kubectl annotate pod {dn pod name} runmode=debug
Then directly log into the corresponding dn pod, enter the myc
command to access the MySQL command-line interface, and execute the following command:
mysql> shutdown;
This will restart the DN process without rebuilding the dn pod.
After you are done, remember to execute the following command to turn the liveness probe back on:
kubectl annotate --overwrite pod {dn pod name} runmode-