Rate This Document
Findability
Accuracy
Completeness
Readability

Restarting a Specified MySQL Pod

K8s does not provide the command for restarting a MySQL pod. Therefore, you can delete the original pod and then use the YAML file for MySQL deployment. For example:

  • Method 1
    1
    2
    kubectl delete pod mysql-1 -n ns-mysql-test
    kubectl apply -f ./mysql_deployment.yaml
    
  • Method 2
    1
    kubectl get pod mysql-1 -n ns-mysql-test -o yaml | kubectl replace --force -f -