All-Things-Docker-and-Kubernetes

Rollouts and Rollbacks

Rollouts

Kubernetes uses rollouts to updates the deployments, which includes replacing the replicas that matches the specs in the new deployment template. Other changes could also include environment variables, labels, and code changes.

Any changes in the deployment tempalte will trigger a rollout.

Rollout Strategies

Rolling Updates This is the default strategy used by Kubenetes.

Recreate This deletes all the old pods before the new version of the application is rolled out.

Rollbacks

Rollbacks can be used to revert to a previous revision of the deployed application. To perform a rollback:

kubectl rollout undo deployment/myapp-deployment  

Rollouts and Rollbacks in Action

To see rolling updates in action, check out this lab.


Back to first page