Kubernetes 101 : Revisions, rollouts, updates and deployments

To create a deployment of "nginx" pods, we use the below command:

To get the status of our deployment, we use the below command:

Updating the version of our image:

We could update the image of our "nginxdeployment to the "nginx:1.21" version using the below command:

Then, we recheck our rollout history using the below command:

To have a record in the "CHANGE-CAUSE" section, we would need to use the "--record" flag as below:

Then we could see the "--record" in the rollout history:


when we rollback, we go back to the "before" state. 
If we want to go back to a certain revision as mentioned in the output of the "rollout history" command, we would need to mention the revision number, as below:


Leave as a comment: