From the course: Certified Kubernetes Application Developer (CKAD) Cert Prep

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Deployment history

Deployment history

- So let's investigate a little bit more this deployment update procedure and how deployment history can help you. So what is going on? Well, during the deployment update procedure, the deployment creates a new ReplicaSet that uses the new properties. And as we have seen, the old ReplicaSet is kept, but the number of pods after the upgrade will be set to zero and that makes it easy to roll back to the previous state. Kubectl rollout history is a command that's going to be helpful because it'll show the rollout history of a specific deployment and you can easily revert as well. So if you want to check what is happening, use kubectl rollout history deployment on your deployment. Minus minus revision is one to observe the changes between versions. Let's check it out. So this time we are using a YAML file rolling.yaml. And as you can see, it creates deployment using a rolling update with maxSurge and maxUnavailable parameters set in for replicas in a pretty old version of the NGINX image.…

Contents