There are commands given here which explain how to perform a rollback using kubectl. One that lists the previous versions of your deployment is:

kubectl rollout history deployment/myDeployment

This shows a list of previous versions based on their order and just their corresponding numbers. But how to know more details about them? It is hard to know which version I am rolling back to by just looking at a number.

1 Answer

You can use the revision flag to get more information:

kubectl rollout history deployment/<Deployment-name> --revision=<revision-number>

This will give you details about the Pod Template used in the specified revision number.

If you want the date on which the revision was deployed, use the -o yaml flag and check for creationTimestamp

kubectl rollout history deployment/<Deployment-name> --revision=<revision-number> -o yaml

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.