简体   繁体   中英

kubernetes/kubectl is there a way to roll forward an update after using rollout undo?

If I rollback a deployment to a previous version as the docs specify :

kubectl rollout undo deployment.v1.apps/nginx-deployment
kubectl rollout status deployment.v1.apps/nginx-deployment

Say we start at version A, update deployment to version B, use rollout undo to go back to version A, is there any way to roll forward and get back to version B?

The newest version should be in your history.

kubectl rollout history deployment.v1.apps/nginx-deployment

Find the newest-revision and plug it in below:

kubectl rollout undo deployment.v1.apps/nginx-deployment --to-revision=<newest-version>

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