Hello, Kubernetes learners! In this Kubernetes lab, we’ll explore one of the pivotal features of Kubernetes: Rolling Updates. If you’ve ever wanted to seamlessly deploy new versions of your applications with zero downtime, this guide is for you!
TL;DR — What is a Rolling Update?
A rolling update is a method of deploying new versions of an application without downtime. Instead of stopping the entire application to deploy the new version, Kubernetes replaces old Pods with new ones gradually.
Step-by-Step Practical Lab:
Step 1: Deploying the Initial Version of the Application
- Defining the Deployment: Let’s deploy a simple nginx version 1.16.
k create deployment nginx --image=nginx:1.16
Step 2: Making Changes and Deploying with a Rolling Update
- Modifying the Deployment: Update the nginx image version to 1.17
kubectl set image deployment nginx nginx=nginx:1.17