Maintenance windows define approved periods for performing cluster operations. PodDisruptionBudgets (PDBs) guard critical services during these windows.
| Service | PDB Rule | Impact During Drain |
|---|---|---|
| Backend | minAvailable: 2 | Max 1 pod drained at a time |
| Database | maxUnavailable: 0 | No disruption allowed |
| Frontend | minAvailable: 1 | Max 1 pod drained at a time |
| Monitoring | minAvailable: 1 | Max 1 pod drained at a time |
- Draining a node requires evaluating all PDBs
- A drain stalls if any PDB would be violated
- Use
kubectl drain --disable-evictionto bypass PDBs only in emergencies
# Cordo the node to prevent new pods
kubectl cordon <node-name>
# Drain respecting PDBs
kubectl drain <node-name> --ignore-daemonsets
# Verify node is drained
kubectl get pods --all-namespaces --field-selector spec.nodeName=<node-name># Bypass PDBs during incident
kubectl drain <node-name> --ignore-daemonsets --disable-eviction --force
# After incident, verify all services recovered
bash infrastructure/scripts/validate-services.shkubectl uncordon <node-name>| Day | Window (UTC) | Type | Impact |
|---|---|---|---|
| Tuesday | 02:00-04:00 | Standard drain | Low |
| Thursday | 02:00-04:00 | Standard drain | Low |
| Emergency | As needed | Bypass PDBs | High |
- Verify PDBs are in place:
kubectl get pdb --all-namespaces - Check service health:
bash infrastructure/scripts/validate-services.sh - Ensure sufficient replicas running:
kubectl get pods --all-namespaces - Notify team via Slack #ops channel
- Review runbooks for affected services
- Validate all pods are running:
kubectl get pods --all-namespaces | grep -v Running - Run smoke tests:
bash infrastructure/scripts/smoke-tests.sh - Check PDB status:
kubectl describe pdb -n gistpin-prod - Validate application health endpoint returns 200
If a drain is blocked by a PDB:
- Identify the blocking PDB:
kubectl describe pdb <name> -n <namespace> - Check pod distribution:
kubectl get pods -n <namespace> -o wide - Evaluate if temporary PDB relaxation is needed
- Only modify PDBs with manager approval