Kubectl rollout status deployment is the essential command for monitoring Kubernetes deployment progress. It provides real-time feedback during rollouts and integrates seamlessly with CI/CD pipelines. This guide covers everything you need to know about tracking deployment status in 2026.
Quick Reference: Kubectl Rollout Status Commands
| Command | Description |
|---|---|
kubectl rollout status deployment/nginx | Monitor deployment rollout |
kubectl rollout status deployment/nginx --timeout=5m | With timeout |
kubectl rollout status deployment/nginx --watch=false | Non-blocking check |
kubectl rollout status deployment/nginx --revision=3 | Specific revision |
kubectl rollout status statefulset/mysql | StatefulSet status |
kubectl rollout status daemonset/fluentd | DaemonSet status |
What Is Kubectl Rollout Status?
The kubectl rollout status command monitors a workload’s rollout until completion. It blocks execution and provides real-time updates, making it ideal for CI/CD pipelines and deployment scripts.
How It Works
- Command connects to Kubernetes API
- Watches deployment conditions and pod states
- Reports progress until rollout completes
- Exits with code 0 (success) or non-zero (failure)
Exit Codes
| Code | Meaning | Action |
|---|---|---|
| 0 | Rollout successful | Deployment complete |
| 1 | Rollout failed | Check deployment events |
| Non-zero | Timeout/Error | Investigate and retry |
Basic Usage
Monitor Deployment Rollout
kubectl rollout status deployment/nginx
Output during rollout:
Waiting for deployment "nginx" rollout to finish: 0 of 3 updated replicas are available...
Waiting for deployment "nginx" rollout to finish: 1 of 3 updated replicas are available...
Waiting for deployment "nginx" rollout to finish: 2 of 3 updated replicas are available...
deployment "nginx" successfully rolled out
With Namespace
kubectl rollout status deployment/api-server -n production
StatefulSet and DaemonSet
# StatefulSet
kubectl rollout status statefulset/mysql
# DaemonSet
kubectl rollout status daemonset/fluentd
Advanced Options
Set Timeout
Fail if rollout doesn’t complete within specified time:
# 5 minute timeout
kubectl rollout status deployment/nginx --timeout=5m
# 300 second timeout
kubectl rollout status deployment/nginx --timeout=300s
# 2 minute timeout
kubectl rollout status deployment/nginx --timeout=2m
Non-Blocking Check
Get current status without waiting:
kubectl rollout status deployment/nginx --watch=false
Output:
deployment "nginx" successfully rolled out
# or
Waiting for deployment "nginx" rollout to finish: 1 of 3 updated replicas are available...
Monitor Specific Revision
# Check specific revision status
kubectl rollout status deployment/nginx --revision=3
Understanding Output Messages
Common Status Messages
| Message | Meaning |
|---|---|
0 of N updated replicas are available | New pods starting |
N of N updated replicas are available | All pods ready |
M old replicas are pending termination | Old pods shutting down |
deployment "X" successfully rolled out | Complete |
error: deployment "X" exceeded its progress deadline | Timeout/failure |
Example Complete Rollout
$ kubectl rollout status deployment/api
Waiting for deployment "api" rollout to finish: 0 of 3 updated replicas are available...
Waiting for deployment "api" rollout to finish: 1 of 3 updated replicas are available...
Waiting for deployment "api" rollout to finish: 2 of 3 updated replicas are available...
deployment "api" successfully rolled out
Example Failed Rollout
$ kubectl rollout status deployment/api --timeout=2m
Waiting for deployment "api" rollout to finish: 1 of 3 updated replicas are available...
error: timed out waiting for rollout to finish
CI/CD Integration
GitHub Actions
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy to Kubernetes
run: |
kubectl apply -f deployment.yaml
kubectl rollout status deployment/api --timeout=5m
env:
KUBECONFIG: ${{ secrets.KUBECONFIG }}
GitLab CI
deploy:
stage: deploy
script:
- kubectl apply -f k8s/
- kubectl rollout status deployment/api -n production --timeout=300s
only:
- main
Jenkins Pipeline
pipeline {
stages {
stage('Deploy') {
steps {
sh '''
kubectl apply -f deployment.yaml
kubectl rollout status deployment/api --timeout=5m
'''
}
}
}
}
Bash Script with Error Handling
#!/bin/bash
set -e
DEPLOYMENT="api"
NAMESPACE="production"
TIMEOUT="5m"
echo "Deploying $DEPLOYMENT..."
kubectl apply -f deployment.yaml
echo "Waiting for rollout to complete..."
if kubectl rollout status deployment/$DEPLOYMENT -n $NAMESPACE --timeout=$TIMEOUT; then
echo "Deployment successful!"
exit 0
else
echo "Deployment failed!"
kubectl rollout undo deployment/$DEPLOYMENT -n $NAMESPACE
exit 1
fi
Troubleshooting Failed Rollouts
Step 1: Check Rollout Status
kubectl rollout status deployment/api --watch=false
Step 2: Describe Deployment
kubectl describe deployment api | tail -20
Look for conditions and events:
Conditions:
Type Status Reason
---- ------ ------
Available True MinimumReplicasAvailable
Progressing False ProgressDeadlineExceeded
Step 3: Check Pod Status
# Find problematic pods
kubectl get pods -l app=api
# Describe failing pod
kubectl describe pod api-new-abc123
Step 4: Check Logs
# Current pod logs
kubectl logs api-new-abc123
# Previous container logs (if restarting)
kubectl logs api-new-abc123 --previous
Step 5: Check Events
kubectl get events --sort-by='.lastTimestamp' | grep api
Common Failure Causes
| Issue | Symptom | Solution |
|---|---|---|
| Image pull failure | ImagePullBackOff | Check image name, registry access |
| Readiness probe failing | Pods not ready | Fix probe or app startup |
| Resource limits | OOMKilled | Increase memory limits |
| Config issues | CrashLoopBackOff | Check ConfigMaps, Secrets |
| Liveness probe | Pod restarts | Increase probe delays |
Related Rollout Commands
View Rollout History
kubectl rollout history deployment/api
Output:
deployment.apps/api
REVISION CHANGE-CAUSE
1 kubectl apply --filename=deployment.yaml
2 kubectl set image deployment/api api=api:v1.1.0
3 kubectl rollout restart deployment/api
View Specific Revision
kubectl rollout history deployment/api --revision=2
Undo Rollout
# Undo last rollout
kubectl rollout undo deployment/api
# Undo to specific revision
kubectl rollout undo deployment/api --to-revision=2
Pause and Resume
# Pause rollout
kubectl rollout pause deployment/api
# Resume rollout
kubectl rollout resume deployment/api
Progress Deadline Configuration
Kubernetes has a progress deadline that determines when a rollout is considered failed.
Set Progress Deadline
apiVersion: apps/v1
kind: Deployment
metadata:
name: api
spec:
progressDeadlineSeconds: 600 # 10 minutes (default)
replicas: 3
template:
spec:
containers:
- name: api
image: api:latest
Progress Deadline Values
| Value | Use Case |
|---|---|
| 300 (5m) | Quick deployments |
| 600 (10m) | Standard apps (default) |
| 900 (15m) | Large deployments |
| 1800 (30m) | Slow-starting apps |
Monitoring Multiple Deployments
Sequential Monitoring
#!/bin/bash
DEPLOYMENTS=("api" "worker" "scheduler")
NAMESPACE="production"
for deploy in "${DEPLOYMENTS[@]}"; do
echo "Checking $deploy..."
kubectl rollout status deployment/$deploy -n $NAMESPACE --timeout=5m
done
Parallel Monitoring
#!/bin/bash
kubectl rollout status deployment/api -n production &
kubectl rollout status deployment/worker -n production &
kubectl rollout status deployment/scheduler -n production &
wait
echo "All deployments complete"
Check All Deployments in Namespace
# List all deployment statuses
kubectl get deployments -n production
# Watch all deployments
kubectl get deployments -n production -w
Best Practices
1. Always Set Timeouts in CI/CD
kubectl rollout status deployment/api --timeout=5m || exit 1
2. Combine with Apply
kubectl apply -f deployment.yaml && \
kubectl rollout status deployment/api --timeout=5m
3. Auto-Rollback on Failure
#!/bin/bash
if ! kubectl rollout status deployment/api --timeout=5m; then
echo "Rollout failed, rolling back..."
kubectl rollout undo deployment/api
exit 1
fi
4. Log Rollout Details
#!/bin/bash
echo "Starting deployment at $(date)"
kubectl apply -f deployment.yaml
if kubectl rollout status deployment/api --timeout=5m; then
echo "Deployment succeeded at $(date)"
kubectl get deployment api -o yaml > deployment-success.yaml
else
echo "Deployment failed at $(date)"
kubectl describe deployment api > deployment-failure.txt
kubectl logs -l app=api --tail=100 >> deployment-failure.txt
fi
5. Use with Progress Deadline
spec:
progressDeadlineSeconds: 300 # Match your --timeout
Comparison with Alternatives
| Method | Blocking | Exit Code | Best For |
|---|---|---|---|
kubectl rollout status | Yes | Yes | CI/CD, scripts |
kubectl get deployment | No | No | Quick checks |
kubectl describe deployment | No | No | Debugging |
kubectl get pods -w | Yes | No | Visual monitoring |
Conclusion
Kubectl rollout status deployment is essential for reliable Kubernetes deployments in 2026. Key takeaways:
- Use in all CI/CD pipelines for deployment verification
- Always set timeouts with
--timeout - Combine with
kubectl rollout undofor auto-rollback - Check exit codes for automation
- Use
--watch=falsefor non-blocking status checks
Master this command to build robust deployment pipelines and catch issues early.
Related Resources
- Kubectl Rollout Restart 2026
- Kubectl Restart Pod 2026
- Kubernetes News Today 2026
- Kubernetes Consulting Services
Need help with Kubernetes deployments? Book a free 30-minute consultation with our DevOps experts.