Performing a Rolling Update

Learn how we can perform a rolling update on the app.

Introduction to rolling updates

As stated previously, scaling operations are almost instantaneous. This is not the case with rolling updates. Rolling updates gradually replaces old instances with new ones, ensuring that some versions of the application remain available at all times.

Let’s perform a rolling update.

Note: The terms rollout, release, zero-downtime update, and rolling update mean the same thing, and we’ll use them interchangeably.

The new version of the app has already been created, tested, and uploaded to Docker Hub with the nigelpoulton/k8sbook:2.0 tag. All that’s left is for us to perform the rollout. We’re ignoring real-world CI/CD workflows and version control tools to simplify the process and keep the focus on Kubernetes.

Before continuing, it’s vital we understand that all update operations are actually replacement operations. When we update a Pod, we’re actually deleting it and replacing it with a new one. Pods are immutable objects, so we never change or update them after they’re deployed.

The first step is to update the image version in the deploy.yml file. Let's update the image version to nigelpoulton/k8sbook:2.0. The following trimmed output shows which line in the file to update.

Get hands-on with 1400+ tech skills courses.