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

Viewed 222

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?

1 Answers

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>
Related