Kubernetes 101 : Different ways of upgrading a pod's image



Suppose that we have the below deployment for two replicas of the nginx pods:


We can update the nginx image from the "1.19.0" version to the "1.21.4" version, using the below command:


We could check the status of our update using the below command:


We also check the deployment "nginx-dep":


And we check if the pods that are running under our deployment:


Now, we will update the image using the Yaml file of the deployment by updating the version of the nginx image:


Then, we apply our changes using the below command:



Comments

Leave as a comment:

Archive