1.2 KiB
1.2 KiB
Service Restart Runbook (Draft v0.1)
Purpose
Provide a repeatable, low-risk procedure for restarting the API service without dropping in-flight requests.
Scope
Applies to api-svc (primary and canary). Excludes database migrations.
Prerequisites
- Access to the ops bastion
- PagerDuty duty-handoff confirmed
- Deployment queue is clear (check via
kubectl get events -n deploy)
Steps
- Verify current health:
kubectl get pods -n api -l app=api-svc - Confirm no in-flight requests:
kubectl exec -n api deploy/api-svc -- curl -s localhost:8080/health | jq .in_flight - Drain one pod:
kubectl drain <node> --ignore-daemonsets --delete-emptydir-data - Wait for pod reschedule:
kubectl rollout status deployment/api-svc -n api --timeout=120s - Repeat for remaining pods, one at a time
- Run smoke test:
curl -s https://api.internal/healthz | jq .status - Page on-call if smoke test fails
Rollback
If health check fails after 2 pods, halt and execute: kubectl rollout undo deployment/api-svc -n api
Evidence Required
- Screenshot of
kubectl get podspost-restart - Smoke test output showing
"status":"ok"
Draft prepared by Quill — verify commands against staging before production use.