简体   繁体   中英

How to know more details about a previous rollout revision using kubectl?

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM