🔁 Rollout
A rollout is the gradual update of an application: old pods are replaced by new ones little by little, without taking the service down. If the new version does not become ready, Kubernetes keeps the old pods serving.
Rollouts are done with kubectl. The Nuvion Panel does not have this feature.
🚀 Before you start
- Have cluster access configured (see Cluster Access).
- Have the
web-deployDeployment from the Deploy page (imagenginx:1.26).
🚀 1. Update the image version
kubectl set image deployment/web-deploy nginx=nginx:1.27
The format is CONTAINER-NAME=NEW-IMAGE. In the Deploy page template, the container is named nginx.
🚀 2. Follow the update
kubectl rollout status deployment/web-deploy
kubectl get pods -l app=web-deploy
You will see new pods coming up while the old ones leave. The end result is
successfully rolled out.
🚀 3. Record the reason for the change
kubectl annotate deployment/web-deploy kubernetes.io/change-cause="Atualiza nginx para 1.27" --overwrite
The text appears in the history from step 4.
🚀 4. See the history
kubectl rollout history deployment/web-deploy
Each version of the Deployment is a numbered revision.
🚀 5. Control the pace of the update
By default, Kubernetes updates in stages. You can adjust this in the Deployment:
spec:
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
maxSurge: 1
| Field | Meaning |
|---|---|
maxUnavailable: 0 | Never have fewer pods than desired |
maxSurge: 1 | Can create 1 extra pod during the swap |
🚀 6. Pause and resume (optional)
kubectl rollout pause deployment/web-deploy
kubectl rollout resume deployment/web-deploy
✅ How to know it worked
kubectl get deployment web-deploy -o jsonpath='{.spec.template.spec.containers[0].image}'
The command shows nginx:1.27.
❗ Common problems
| Symptom | Cause | Solution |
|---|---|---|
rollout status keeps waiting | The new pods do not become ready | See kubectl get pods: if ImagePullBackOff appears, the image does not exist. Undo with Rollback |
unable to find container named | Wrong container name | See the name with kubectl describe deployment web-deploy |
timed out waiting for the condition | The update exceeded the deadline | Check the Events and do the Rollback |
➡️ Next step: Rollback
🧠 Questions?
Talk to our SaveinCloud technical support team!