CKAD Prep Part 13 – Rolling Updates & Rollbacks

Rolling Updates & Rollbacks Rolling updates provide a mechanism for updating containers in a cluster without downtime. This powerful Kubernetes feature allows you to update containers while maintaining high availability. To see this in action we'll create a Deployment consisting of 3 nginx Pods using the definition below. Note that the container image we're going to run is library/nginx:1.20.0. apiVersion: apps/v1 kind: Deployment metadata: name: rolling-update-deployment spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: library/nginx:1.20.0 imagePullPolicy: IfNotPresent Run kubectl apply -f rolling-update-deployment.yaml to create the Deployment.  A quick listing will show 3 Pods running as [...]