Restarting a Specified MySQL Pod
K8s does not provide the command for restarting a MySQL pod. Therefore, you can delete the original pod and redeploy it using the YAML file. For example:
- Method 1
1 2
kubectl delete pod mysql-1 -n ns-mysql-test kubectl apply -f ./mysql_deployment.yaml
- Method 2
1kubectl get pod mysql-1 -n ns-mysql-test -o yaml | kubectl replace --force -f -
Parent topic: K8s MGR Maintenance