What to do after deploy? A checklist from the first 5 minutes to the first week
What to do once the pipeline turns green: smoke tests and synthetic checks, progressive delivery with automated analysis and rollback, golden signals and burn rate, environment gates, runtime security, rollback, communication, cleanup, and change fail rate.
CI/CD$ kubectl argo rollouts get rollout api --watch▍The pipeline turned green, the “deployed to production” message showed up in the channel, and everyone moved on to the next card. That is exactly where many incidents begin: a successful deployment only means the artifact reached the server, not that it works for the user.
This post organizes that “after” as a timeline and shows how to automate most of it.
The post-deploy timeline
First 5 minutes
- Run the smoke test against production: health check, one or two critical journeys, and the deployed version.
- Confirm the deployment was marked on the dashboards (more below).
- Look at the service’s error rate and latency compared with the previous 30 minutes.
- If something is clearly wrong, roll back first and investigate later.
First hour
- Follow the canary or the blue/green switch to the end, preferably with automated analysis.
- Check error tracking: are there new exceptions tied to the version that just went out?
- Check the SLO burn rate: a bad deployment shows up as accelerated error budget consumption.
First day
- Review the alerts that fired and the behavior at peak hours.
- Run DAST against staging (or a prod-like environment) if it hasn’t run on this version yet.
- Publish the changelog and notify whoever depends on the change.
First week
- Roll the feature flags out to 100% and schedule their removal.
- Delete old resources: the leftover “blue” environment, images, and ephemeral environments.
- Record the deployment’s outcome in the change fail rate and rework metrics.
Verification: smoke tests and synthetic checks
The smoke test runs right after the deployment, as a step of the pipeline itself. It tests only the essentials and has to tolerate a few seconds of instability while the new version warms up, which is why it uses retries and a timeout:
#!/usr/bin/env bash
# smoke-test.sh — quick checks after a deployment
set -euo pipefail
BASE_URL="${1:-https://api.example.com}"
EXPECTED_VERSION="${2:-}" # e.g., the SHA of the deployed commit
ATTEMPTS=5
WAIT=6 # seconds between attempts
TIMEOUT=5 # seconds per request
failures=0
check() {
local path="$1" expected_status="$2" status
for ((i = 1; i <= ATTEMPTS; i++)); do
status=$(curl -s -o /dev/null -w '%{http_code}' \
--connect-timeout 2 --max-time "$TIMEOUT" \
"${BASE_URL}${path}") || status="000"
if [[ "$status" == "$expected_status" ]]; then
echo "OK ${path} -> ${status}"
return 0
fi
echo "attempt ${i}/${ATTEMPTS}: ${path} -> ${status}" >&2
sleep "$WAIT"
done
echo "FAIL ${path}: expected ${expected_status}, got ${status}" >&2
failures=$((failures + 1))
}
check "/healthz" 200
check "/api/v1/products?limit=1" 200
check "/api/v1/orders" 401 # must be denied without a token
if [[ -n "$EXPECTED_VERSION" ]]; then
version=$(curl -fsS --max-time "$TIMEOUT" "${BASE_URL}/version" || true)
if [[ "$version" != *"$EXPECTED_VERSION"* ]]; then
echo "FAIL deployed version: '${version}' (expected ${EXPECTED_VERSION})" >&2
failures=$((failures + 1))
fi
fi
if ((failures > 0)); then
echo "Smoke test failed (${failures} check(s))" >&2
exit 1
fi
echo "Smoke test OK"
Note two details. The 401 check confirms that authentication still holds, because a deployment that opens up a protected route is also a failure. And the version check avoids the classic false positive: the smoke test passes, but against the old version, because traffic hasn’t switched yet.
Synthetic checks apply the same principle all the time: probes that run critical journeys every minute from outside your network. They catch what the smoke test doesn’t, such as an expiring certificate or a DNS change, and they are among the best symptom-based alerts.
Progressive delivery: canary, blue/green, and feature flags
Instead of sending 100% of the traffic to the new version at once, progressive delivery limits the damage of a bad deployment:
- Canary: a fraction of the traffic goes to the new version and grows in steps.
- Blue/green: the new version comes up in full alongside the old one and traffic switches at once, with an instant way back.
- Feature flags: the code ships to production turned off and the feature is released by audience, separating deploy from release.
The three complement each other. The basics of canary and blue/green on Kubernetes are in the post on scaling and updating applications, and flags in the post on feature flags with OpenFeature.
Automated analysis and rollback with Argo Rollouts and Flagger
A canary with someone watching the dashboard works until the day nobody is watching. Argo Rollouts (v1.10.2 as of this writing) automates the decision with an AnalysisTemplate, which defines the metrics and the success conditions. Each execution of it is an AnalysisRun:
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: api
spec:
replicas: 5
selector:
matchLabels:
app: api
workloadRef: # reuses the existing Deployment's template
apiVersion: apps/v1
kind: Deployment
name: api
strategy:
canary:
steps:
- setWeight: 20
- pause: {duration: 5m}
- analysis: # inline analysis: blocks until it finishes
templates:
- templateName: success-rate
args:
- name: service
value: api
- setWeight: 50
- pause: {duration: 10m}
---
apiVersion: argoproj.io/v1alpha1
kind: AnalysisTemplate
metadata:
name: success-rate
spec:
args:
- name: service
metrics:
- name: success-rate
interval: 1m
count: 5
failureLimit: 1
successCondition: result[0] >= 0.99
provider:
prometheus:
address: http://prometheus.monitoring.svc:9090
query: |
sum(rate(http_requests_total{service="{{args.service}}",code!~"5.."}[2m]))
/
sum(rate(http_requests_total{service="{{args.service}}"}[2m]))
If the analysis fails, Argo Rollouts aborts the rollout, sets the canary weight back to zero, and marks the rollout as Degraded: that is the automated rollback. If the result is inconclusive, it pauses and waits for a person to decide. The analysis can be inline, as a step that blocks progress, or run in the background for the whole canary. Without a service mesh or ingress that splits the traffic, the weight is approximated by the replica ratio. And in production, filter the query so it measures only the canary pods.
Flagger (v1.45.0 as of this writing) follows the same idea with a Canary resource, integrated with service meshes and ingress controllers. Check the current docs for both before adopting them, because versions change quickly.
Monitoring: golden signals, burn rate, and error tracking
Watch the four golden signals: latency, traffic, errors, and saturation. After a deployment, what matters is the change: did p99 latency go up? Did the error rate double? Did traffic drop?
To avoid depending on someone watching graphs, alert on SLO burn rate, with multi-window, multi-burn-rate alerts that fire fast for severe drops and slowly for gradual degradation. The post on SLO and error budget culture shows how to set this up.
Error tracking completes the picture: tag each release with its version (in OpenTelemetry, the service.version resource attribute) and configure your error tracker to highlight exceptions that appear for the first time in that version. The OWASP Top 10:2025 has a new category, Mishandling of Exceptional Conditions, precisely about poorly handled errors; see what the OWASP Top 10 is.
Mark the deployment on the dashboards
A vertical line on the graph saying “api deploy abc123” saves minutes of investigation. In Grafana, a call to the annotations API at the end of the pipeline does the job:
# Marks the deployment in Grafana (the time defaults to "now")
curl -fsS -X POST "https://grafana.example.com/api/annotations" \
-H "Authorization: Bearer ${GRAFANA_TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"tags\":[\"deploy\",\"api\"],\"text\":\"api deploy ${GITHUB_SHA}\"}"
APM and error-tracking tools have equivalent features. Use the same identifier (SHA or tag) everywhere.
Gates: approvals and checks on environments
GitHub and Azure DevOps environments let you put gates between stages, including gates that look at production health:
| Platform | Feature | What it offers |
|---|---|---|
| GitHub | Required reviewers | Up to 6 reviewers, with an option to prevent self-review |
| GitHub | Wait timer | A wait of up to 30 days before the job proceeds |
| GitHub | Deployment branches and tags | Only allowed refs deploy to the environment |
| GitHub | Custom deployment protection rules | GitHub Apps approve or reject (public preview), up to 6 per environment |
| Azure DevOps | Static checks | Branch control, Required template, Evaluate artifact |
| Azure DevOps | Dynamic checks | Approval, Invoke Azure Function, Invoke REST API, Business Hours, Query Azure Monitor alerts |
| Azure DevOps | Exclusive lock | One deployment at a time to the environment (lockBehavior: sequential or runLatest) |
On Azure DevOps, checks are configured in the environment’s UI, not in YAML, and they run in order: static checks, pre-check approvals, dynamic checks, post-check approvals, and finally the exclusive lock. The Query Azure Monitor alerts check is especially useful for staged rollouts: the next stage only proceeds if no alert fired after the previous one. On GitHub, private repositories need higher plans for reviewers, timers, and custom rules; check the current docs.
Security after deploy
- DAST against staging or a prod-like environment on every release. Tools such as ZAP and Nuclei attack the running application the way an attacker would. See where this fits in the pipeline in SCA, SAST, and DAST.
- A WAF at the edge to block known attack patterns until fixes arrive.
- Runtime security with Falco (0.45.2 as of this writing), a CNCF project that detects suspicious behavior in containers, such as a shell opened inside a pod.
That is the DevSecOps principle: detect continuously, from code to runtime.
Rollback, communication, and cleanup
Rollback runbook. Decide beforehand, not during the incident: which signals trigger a rollback, who can execute it, and how. The commands should be in the runbook, ready to copy:
# Argo Rollouts: aborts the canary and sends all traffic back to the stable version
kubectl argo rollouts abort api
# Argo Rollouts: goes back to the previous revision after promotion
kubectl argo rollouts undo api
# Plain Kubernetes Deployment
kubectl rollout undo deployment/api
kubectl rollout status deployment/api --timeout=5m
Watch out for database migrations: if the new version changed the schema in an incompatible way, rolling back the code isn’t enough. Prefer migrations compatible with both versions (expand first, contract later). Sometimes the fastest rollback isn’t even a deployment: it’s turning off a feature flag.
Communication and changelog. Notify support, product, and dependent teams, publish the changelog, and, if there is visible impact, update the status page.
Cleanup. Flags rolled out to everyone become technical debt and dead code paths; remove them. Delete the old blue/green environment, replicas, and resources left behind.
Track the change fail rate
Every deployment ends with an answer: did it need immediate intervention (rollback, hotfix)? If so, it counts toward the change fail rate. If it triggered an unplanned deployment because of an incident, it also counts toward the deployment rework rate, DORA’s newest metric. Record this on the deployment itself, with a label or a tag, and collect the numbers as shown in how to improve your CI/CD. If the rate goes up, the problem is upstream of the deployment: tests, review, or the size of the changes.
If something goes wrong
Recover first, understand later. To shorten recovery, instrument with business context to reduce MTTR and review whether your alerts are symptom-based. Then turn the incident into learning with a blameless postmortem.
Checklist
- Smoke test with retries and a timeout running as a pipeline step
- Deployment marked on the dashboards and version recorded in error tracking
- Canary or blue/green with automated analysis and rollback
- SLO burn-rate alerts and synthetic checks active
- Gates on environments, including checks that look at production alerts
- Rollback runbook tested and changelog published
- Flags removed, old resources deleted, and change fail rate recorded
A deployment is the beginning of the conversation with production, not the end. Listen closely in the first few minutes.