What if you could update your app without your users ever noticing a thing?
Why Rolling update strategy in Kubernetes? - Purpose & Use Cases
Imagine you have a website running on several servers. You want to update the website without making it go offline. So, you stop one server, update it, then start it again. Then you do the same for the next server, and so on.
This manual way is slow and risky. If you stop too many servers at once, your website breaks. If you forget to start a server, users get errors. It's hard to keep track and fix mistakes quickly.
The rolling update strategy in Kubernetes updates your app step-by-step automatically. It replaces old versions with new ones little by little, keeping the app running all the time. If something goes wrong, it stops and fixes it before continuing.
kubectl delete pod pod-1 kubectl apply -f new-version.yaml kubectl delete pod pod-2 kubectl apply -f new-version.yaml
kubectl set image deployment/myapp myapp=myapp:v2 kubectl rollout status deployment/myapp
You can update your app smoothly without downtime, keeping users happy and your service reliable.
A popular online store updates its product page code. Using rolling updates, customers keep shopping without noticing any interruption during the update.
Manual updates risk downtime and errors.
Rolling updates replace app versions gradually and safely.
This keeps services running smoothly during changes.