CICD-174 · Compare candidate to previous deployment digest
Encyclopedia · Deployment and rollback · All snippets
Previous · CICD-173 · Next · CICD-175
1. Where it fits
- Placement Bash run step following checkout, or equivalent lab terminal.
- Prerequisites protected staging environment and trusted immutable release artifacts.
- Platforms kubernetes, local-lab.
- Parameters
IMAGE.
2. Copy the snippet
bash
kubectl -n staging get deploy web -o jsonpath='{.spec.template.spec.containers[?(@.name=="web")].image}' | grep -Fx "${IMAGE:?}"3. How it works
The JSONPath expression reads the desired image from the named container. Exact matching verifies the configured reference, while Pod image IDs establish what is actually running.
4. Verify the result
Verify desired state and separately compare observed Pod readiness and actual image ID.
Validation syntax-validated (Bash parse). Status definitions.