Selected topic
Deployment
Prefer practical output? Use related tools below while reading.
A rolling update is a strategy used to deploy new versions of an application in a Kubernetes cluster while minimizing downtime and ensuring high availability. It involves creating multiple replicas of the old version, updating one replica at a time, and then scaling down the old version once the update is complete.
example.com). We want to deploy a new version of the application with some bug fixes and minor UI changes. Our current deployment has 3 replicas running on nodes A, B, and C.v2) for the updated version of our web server application.example.com deployment to use a rolling update with 3 replicas. This will ensure that we have multiple replicas available during the update process.yml
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-com
spec:
selector:
matchLabels:
app: example-com
template:
metadata:
labels:
app: example-com
spec:
containers:
- name: web-server
image: example-com:v2
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0maxSurge) during the update process, and we want all replicas to be updated at once (maxUnavailable is set to 0).