Stage 11, Part 7 of 9, Cluster Lifecycle & Operations

Text

PART 7: INCIDENT MANAGEMENT

32. Cluster Lifecycle Incident Post-Mortem Template

text
INCIDENT: etcd Quorum Lost During Upgrade
DATE: 2024-01-15
DURATION: 2 hours
SEVERITY: SEV-1
IMPACT: Cluster unmanageable. API server returned errors.

TIMELINE:
  14:00 - Started control plane upgrade
  14:15 - etcd member 1 failed to restart
  14:20 - etcd member 2 failed to restart
  14:25 - Quorum lost (1 of 3 members remaining)
  14:30 - Initiated restore from snapshot
  15:00 - Restored etcd from snapshot
  15:30 - Cluster operational
  16:00 - Upgrade completed
  16:00 - Incident closed

ROOT CAUSE:
  Disk I/O latency exceeded thresholds during upgrade.
  Two etcd members failed health checks and were killed.

LESSONS LEARNED:
  1. etcd needs dedicated SSD with low fsync latency.
  2. Upgrade should be done during low-traffic windows.
  3. etcd snapshots must be tested regularly.

ACTION ITEMS:
  [ ] Move etcd to NVMe SSD (Owner: Platform)
  [ ] Test etcd restore monthly (Owner: SRE)
  [ ] Add etcd I/O monitoring (Owner: SRE)

33. On-Call Runbook: Upgrade Failure / etcd Outage

text
STEP 1: Check cluster health
  $ kubectl get nodes
  $ kubectl get pods -n kube-system

STEP 2: Check etcd
  $ etcdctl endpoint health --cluster
  $ etcdctl endpoint status --cluster --write-out=table

STEP 3: Check control plane pods
  $ crictl ps | grep -E "apiserver|etcd|scheduler|controller"

STEP 4: Check logs
  $ journalctl -u kubelet -n 100
  $ crictl logs <container-id>

STEP 5: If etcd is down
  $ systemctl restart etcd
  # Or restore from snapshot

STEP 6: If upgrade is stuck
  # Check kubeadm logs
  # Check static pod manifests

STEP 7: Escalate

34. Escalation Matrix

SeverityImpactResponse TimeEscalation
SEV-1etcd quorum lost / all control planes down5 minOn-call + Platform + Management
SEV-2Upgrade failure / certificate expired15 minOn-call + Platform
SEV-3PDB blocks drain / backup failed1 hourOn-call
SEV-4Capacity planning warning4 hoursTicket

1:1 copy of the class Google Doc, code in code blocks.