Short answer: a green run only guarantees that every command exited 0
If Actions succeeded but the rollout failed or never happened, the workflow did not wait for or check the rollout result. The cause is usually one of five:
- kubectl apply or helm returns before the rollout completes — new pods die, the step still passes
- New pods never pass their readiness probe
- The image tag did not change, so no new ReplicaSet is created
- The deploy went to the wrong context or namespace
- continue-on-error hides a failed step, or a GitOps sync never happened
Diagnosis: what is the cluster actually doing?
kubectl rollout status deploy/checkout -n prod --timeout=180s
Waiting for deployment "checkout" rollout to finish: 1 out of 3 new replicas have been updated...
error: deployment "checkout" exceeded its progress deadline
- exceeded its progress deadline or timed out waiting for the condition → new pods never become Ready (cause 2)
- successfully rolled out, but the old version is serving → check the tag and context (causes 3 and 4)
- This command is not in the workflow log at all → cause 1
Cause 1: a deploy step that does not wait
kubectl apply exits 0 as soon as the API server accepts the manifest. Make rollout completion the gate.
kubectl apply -f k8s/ -n prod
kubectl rollout status deploy/checkout -n prod --timeout=180s
# Helm 3
helm upgrade --install checkout ./chart -n prod --wait --atomic --timeout 5m
--atomic rolls back to the previous release on failure and turns on --wait automatically. On Helm 4 the flag may have been renamed, so check helm upgrade --help.
Cause 2: readiness probe failures
kubectl get events -n prod --field-selector reason=Unhealthy
Readiness probe failed: HTTP probe failed with statuscode: 404 means the probe path or port no longer matches the new version. For slow-starting apps, give them room with a startupProbe.
Causes 3 and 4: the tag did not change, or the target is wrong
If apply prints deployment.apps/checkout unchanged, nothing changed as far as the cluster is concerned. Instead of :latest, tag every build with the commit SHA (${{ github.sha }}). Before deploying, print kubectl config current-context into the log and pin the namespace with -n.
Cause 5: settings that hide failure
- name: Wait for rollout
id: rollout
run: kubectl rollout status deploy/checkout -n prod --timeout=180s
continue-on-error: true # with this line the job passes even if the step fails
When a step with continue-on-error: true fails, steps.rollout.outcome is failure but its conclusion is success, so the job ends green. Remove it from deploy steps; a trailing || true on a command does the same thing. With GitOps such as Argo CD, CI only pushes the image, so run argocd app get checkout to see whether Sync Status is OutOfSync and confirm the tag in the manifest repository actually changed.
What not to do
- Raising the timeout until it turns green — if the probe is the cause, waiting longer never makes pods Ready.
- Re-pushing the same tag and papering over it with
rollout restart— you lose track of what is actually deployed.
The order to work in
- Add
rollout status --timeoutafter the deploy step (--wait --atomicfor Helm) - On a timeout or progress deadline, look for probe failures in events
- On unchanged or an old version, check the tag, context and namespace
- Search the workflow for continue-on-error and
|| trueand remove them from deploy steps
To practise the probe side of this as a problem, try Rolling update never finishes: the new pod is Running but READY 0/1.
Quick diagnostic checklist
- Confirm the workflow log actually contains
kubectl rollout statusorhelm --wait. - Add
kubectl rollout status deploy/<name> --timeout=180safter the deploy step. - With Helm 3, use
--wait --atomic --timeoutso a failed upgrade rolls back. - On
exceeded its progress deadline, look for probe failures inreason=Unhealthyevents. - If apply prints
unchanged, check that the image tag changes with every commit. - Print
kubectl config current-contextbefore deploying and pin the namespace with-n. - Find and remove
continue-on-error: trueand trailing|| truein deploy steps. - With GitOps, check Sync Status in
argocd app getand the tag in the manifest repository.