Deployment Rollout Status
What you'll learn: How to track the progress of your Kubernetes deployment updates in real-time.
When you update a Deployment (changing the container image, for example), Kubernetes doesn't switch everything instantly. It performs a rollout—gradually replacing old Pods with new ones. But how do you know if it's working? That's where monitoring rollout status becomes essential.
Monitoring Rollout Progress
The primary tool for checking rollout progress is:
kubectl rollout status deployment/my-deployment
This command watches your deployment and reports what's happening. You'll see messages like:
Waiting for deployment "my-deployment" rollout to finish: 2 out of 3 new replicas have been updated...deployment "my-deployment" successfully rolled out
Think of it like tracking a package delivery—you want to know if it's in transit, delayed, or successfully delivered.
Understanding Rollout Conditions and Events
Behind the scenes, Kubernetes maintains conditions on the Deployment object that indicate health:
- Progressing: The rollout is actively updating Pods
- Available: Sufficient replicas are running and ready
- ReplicaFailure: The rollout encountered problems creating Pods
You can see detailed conditions using:
kubectl describe deployment my-deployment
Look for the "Conditions" section and recent "Events" at the bottom. Events show timestamped activities like "Scaled up replica set" or "Error creating Pod."
These conditions help you understand why a rollout might be stuck—perhaps the new image doesn't exist, or resource limits are exceeded.
Key Takeaway: Use kubectl rollout status to monitor deployment updates in real-time, and check conditions and events with kubectl describe to diagnose any issues during the rollout process.