Update and Rollback:
We start by deploying a debian image as below:
In case we run several updated versions of the some deployments, we could check the previous deployments, using the below command:
To change the version of our image, we could use the below command:
The last part of the command corresponds to the below part of the YAML configuration file of the deployment.
The "new_version" could be the version "11" for example.
We could also make the same changes to the image, directly in the YAML configuration file of the deployment object, using the below command:
To know the revisions of our deployment "debian-dep", we use the below command:
We could go back to a certain revision of our deployment using the below command - for example, revision 2 - :
We can annotate our rollout to have more information in the "CHANGE-CAUSE" we saw earlier, as below:
The below parameters could be used with the above command:
--record=true : allows the writing of the annotations in the parameter "kubernetes.io/change-cause".
--overwrite=true : allows overwriting of existing annotations.