CICD-148 · Check deployment convergence
Encyclopedia · Kubernetes fundamentals · All snippets
Previous · CICD-147 · Next · CICD-149
1. Where it fits
- Placement Bash run step following checkout, or equivalent lab terminal.
- Prerequisites isolated Kubernetes namespace, kubectl and reviewed manifests.
- Platforms kubernetes, local-lab.
2. Copy the snippet
bash
kubectl -n staging rollout status deployment/web --timeout=180s3. How it works
The rollout command polls deployment progress until Kubernetes observes convergence or the timeout expires. A successful rollout should still be checked with a service request.
Deployment convergence is an asynchronous observation.
flowchart TD
N1["Desired deployment"]
N2["Kubernetes controller"]
N1 --> N2
N3{"Rollout converged"}
N2 --> N3
N4["Run service smoke test"]
N3 -->|Yes| N4
N5["Inspect events and conditions"]
N3 -->|Timeout| N5
4. Verify the result
Use a bounded timeout. Check events and progress conditions if it fails.
Validation syntax-validated (Bash parse). Status definitions.