| name | deployment |
| description | Plan and execute safe deployments with rollback procedures, verification, and monitoring |
Deployment
Plan and execute safe deployments — rollback procedures, verification steps, and monitoring.
When to Use
- Preparing a production deployment
- Setting up deployment pipelines
- Defining rollback procedures
- Verifying a deployment post-release
Workflow
1. Pre-Deployment Checklist
Before deploying:
2. Choose a Deployment Strategy
| Strategy | When | Risk |
|---|
| Blue/Green | Need instant rollback | Low — traffic switch |
| Canary | Testing with real traffic | Low — limited blast radius |
| Rolling | Resource-constrained environments | Medium — gradual exposure |
| Direct | Non-critical services only | High — all-or-nothing |
3. Deploy
kubectl apply -f deployment-green.yaml
kubectl rollout status deployment/myapp-green
curl -f https://myapp-green.internal/health/ready
kubectl patch service myapp -p '{"spec":{"selector":{"version":"green"}}}'
4. Post-Deployment Verification
- Health check —
/health/ready returns 200
- Smoke test — Critical user path works (e.g., login)
- Metrics — Error rate and latency within normal range
- Logs — No new error patterns in aggregator
5. Rollback (if needed)
| Trigger | Action |
|---|
| Error rate > 1% for 5 minutes | Automated rollback to N-1 |
| Performance degradation > 50% | Manual rollback after investigation |
| Security vulnerability found | Emergency rollback immediately |
kubectl patch service myapp -p '{"spec":{"selector":{"version":"blue"}}}'
6. Post-Deploy
Red Flags
| Signal | Action |
|---|
| Friday afternoon deploy | Postpone to Monday |
| No rollback plan | Define triggers and procedure first |
| Skipping staging | Run in staging first |
| 100% traffic on first deploy | Use canary or blue/green |
Related Skills
Backing Guide