Kubernetes makes it easy to rollout updates to your applications using the builtin rolling update mechanism. In this lab you will learn how to:
- Modify deployments to trigger rolling updates
- Pause and resume an active rolling update
- Rollback a deployment to a previous revision
kubectl rollout history deployment auth
Modify the auth deployment image:
vim auth/deployment.yaml
image: "kelseyhightower/auth:2.0.0"
kubectl apply -f auth/deployment.yaml --record
kubectl describe deployments auth
kubectl get replicasets
kubectl rollout history deployment auth
kubectl rollout history deployment hello
Modify the hello deployment image:
vim hello/deployment.yaml
image: "kelseyhightower/hello:2.0.0"
kubectl apply -f hello/deployment.yaml --record
kubectl describe deployments hello
kubectl rollout pause deployment hello
kubectl rollout resume deployment hello
Use the kubectl rollout undo
command to rollback to a previous deployment of
the Hello service.
In this lab you learned how to rollout updates to your applications by modifying
deployment objects to trigger rolling updates. You also learned how to pause and
resume an active rolling update and rollback it back using the kubectl rollout
command.