Skip to content

Latest commit

 

History

History
executable file
·
53 lines (30 loc) · 1.45 KB

019-Rollouts-and-Rollbacks.md

File metadata and controls

executable file
·
53 lines (30 loc) · 1.45 KB

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.

  • replicas are updated in groups, instead of all-at-once
  • allows services to continue uninterrupted while updates are running
  • old and new versions of the app could be running for some time
  • scaling is not a rollout

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