Rate This Document
Findability
Accuracy
Completeness
Readability

Modifying the Deployment

After modifying the deployment configuration in the YAML file (the file name cannot be changed), run the following command to make the modification take effect:

1
kubectl apply -f ./mysql_deployment.yaml

The apply command cannot be used to make the modification of some configuration data (for example, the CPU modification in single-NUMA restriction mode) take effect. In this case, you can use the following method:

  • Delete the deployment and create a deployment again.
    1
    2
    kubectl delete -f ./mysql_deployment.yaml
    kubectl create -f ./mysql_deployment.yaml
    
  • Delete the specified pod and deploy it again. The following uses mysql-1 as an example.
    kubectl delete pod mysql-1 -n ns-mysql-test
    kubectl apply -f ./mysql_deployment.yaml