KubernetesLXXIII · Control Plane High AvailabilityControl plane HA
HA validation — chaos testing, drills, observability
What you'll learn
- Design chaos tests that validate HA
- Run quarterly restore drills
- Instrument the control plane for HA observability
- Apply the production discipline of continuous validation
Prerequisites
Verified against Kubernetes 1.34.x · kubeadm 1.34.x · kubectl 1.34.x · etcd 3.6.x · CoreDNS 1.11.x · containerd 1.7.x / 2.x · 2026-08-16
HA is a property of the cluster’s design and operations. A design that has not been tested in failure is not HA; it is design. This lesson walks the validation discipline: chaos tests, restore drills, observability for HA, and the cadence that keeps the cluster’s HA real.
The validation hierarchy
flowchart TB
H1[Survive host loss] --> H2[Survive AZ loss]
H2 --> H3[Survive HA failover LB]
H3 --> H4[Restore from snapshot]
H4 --> H5[Operate through full recovery]
Each level is harder than the previous. A production cluster validates each level periodically.
Chaos testing
Chaos testing introduces failures in a controlled way:
| Tool | Use |
|---|---|
| chaos-mesh | Injection for Pods, network, disk |
| Litmus | Workflow-based chaos testing |
| AWS Fault Injection Service | Cloud-level chaos |
Manual (crictl stop) | Direct host / pod kills |
The test workflow:
sequenceDiagram
participant Op as Operator
participant C as Cluster
participant O as Observability
Op->>C: schedule chaos (kill host cp-1)
Op->>O: capture pre-state (replicas, latency, errors)
C->>C: chaos begins
C->>O: monitor post-state
Op->>O: validate SLOs met
Op->>C: end chaos (or stay in failure mode for further testing)
$ kubectl get componentstatusesscheduler Healthy ok
controller-manager Healthy ok
etcd-0 Healthy {"health": "true"}The “kill a host” test
The simplest chaos test: stop a kubelet on a worker.
# On the worker:
sudo systemctl stop kubelet
# Watch the node transition to NotReady:
kubectl get nodes
Expected behaviour:
- After
node-monitor-grace-period, the node is NotReady. - After
node-eviction-timeout, Pods are evicted. - The cluster reconciles: Deployments bring Pods on other nodes.
- The cluster reaches steady state with the lost node’s workloads re-scheduled.
The “kill a control-plane host” test
A larger chaos test: stop all the control-plane processes on one host.
sudo crictl stop $(crictl ps --name kube-apiserver -q)
sudo crictl stop $(crictl ps --name kube-controller-manager -q)
sudo crictl stop $(crictl ps --name kube-scheduler -q)
sudo crictl stop $(crictl ps --name etcd -q)
Expected behaviour:
- The cluster loses one control-plane host.
- The remaining control-plane hosts handle requests.
- The LB routes around the dead host (health check fails).
- Reconciliation continues on the remaining hosts.
- The cluster reaches steady state.
The “kill etcd” test
The most invasive test: take down etcd.
sudo crictl stop $(crictl ps --name etcd -q)
Expected behaviour:
- API server cannot write to etcd.
- The remaining etcd members (2 of 3 in stacked; 4 of 5 in external) may have quorum and continue.
- API server returns timeouts to clients.
- Once etcd restarts, the cluster recovers.
If the test kills all 3 etcd members simultaneously, the cluster is in quorum loss; the recovery is restore from snapshot (Part LXIX).
Restore drills
A restore drill is not chaos; it is a planned exercise to validate the restore path:
gantt
title Restore drill timeline
dateFormat HH:mm
axisFormat %H:%M
section Pick snapshot
Find snapshot :a1, 00:00, 5m
section Restore on sandbox
Build sandbox :b1, after a1, 10m
Run etcdutl snapshot restore :b2, after b1, 30m
Spin up API server :b3, after b2, 10m
section Validate
Verify cluster :c1, after b3, 30m
Document drill :c2, after c1, 15m
The drill:
- Pick a recent snapshot (off-cluster).
- Build a sandbox host (cloud VM or local VM).
- Run
etcdutl snapshot restoreon the sandbox. - Start an etcd process on the sandbox.
- Verify cluster health via
etcdctl endpoint status. - Optionally: start the API server on the sandbox.
- Document the drill outcome.
The drill validates the entire path from snapshot to running etcd. A drill that has been done in the past is reliable; a drill that has never been done is suspect.
Observability for HA
The control plane’s observability is critical:
| Metric | Healthy range |
|---|---|
apiserver_request_duration_seconds p99 | < 200 ms |
apiserver_request_total 5xx rate | < 0.1% |
etcd_disk_backend_commit_duration_seconds p99 | < 50 ms |
etcd_server_has_leader | 1 |
etcd_server_leader_changes_seen_total rate | low |
scheduler_pod_scheduling_duration_seconds p99 | < 500 ms |
controller_reconcile_duration_seconds p99 | < 10 s (varies) |
controller_manager_leader_election | healthy |
The cluster’s SLOs are explicit and observable.
The chaos test cadence
gantt
title Chaos test cadence
dateFormat HH:mm
axisFormat %H:%M
section Daily
Synthetic API requests :a1, 00:00, 1d
section Weekly
Kill a worker kubelet :b1, 1d, 1m
Verify recovery :b2, after b1, 30m
section Monthly
Kill an etcd member :c1, 7d, 1m
Verify recovery :c2, after c1, 30m
section Quarterly
Full cluster restore drill :d1, 90d, 1m
The cadence is the discipline:
- Daily: synthetic API requests validate the LB and authn/authz.
- Weekly: kill a worker kubelet; verify recovery.
- Monthly: kill an etcd member; verify quorum recovery.
- Quarterly: full cluster restore drill from snapshot.
The drill record
Each drill produces a record:
DRILL: Restore from snapshot on sandbox
TIMESTAMP: 2026-08-16 12:00 UTC
SNAPSHOT: s3://prod-etcd-backups/drill/20260715.db
OPERATOR: <name>
OUTCOME: success / partial / failed
TIME-TO-RESTORE: 30 minutes (vs 60-minute target)
OBSERVATIONS:
- Sandbox host build was slow (10 minutes for apt update)
- Certs on sandbox need updating (TTL was 90 days)
- Drill is repeatable
The drill’s output is the procedure’s validation.
Chaos test anti-patterns
| Anti-pattern | Consequence |
|---|---|
| Chaos during business hours | A real incident during a chaos test is ambiguous |
| Chaos on production without rehearsal | Untested procedure may cause more damage |
| Chaos on the only control-plane host | Cluster may be unrecoverable |
| No rollback plan for the chaos | The test itself becomes the incident |
| No automation to end the test | A failed end-condition leaves chaos in place |
The production rule: chaos on a separate test cluster (or test windows on prod), with rollback procedures ready.
The runbook entry for HA validation
PRODUCTION HA VALIDATION
========================
Drill cadence: weekly, monthly, quarterly
Weekly (worker kubelet kill):
1. Schedule window
2. Pick a worker
3. systemctl stop kubelet
4. Watch node transition NotReady
5. Watch eviction
6. Watch workloads re-scheduled
7. Bring kubelet back: systemctl start kubelet
8. Verify health
9. Document
Monthly (etcd member kill):
1. Schedule window
2. Pick an etcd member
3. crictl stop <etcd-pod>
4. Watch leader election
5. Watch reconciliation
6. Restart etcd: crictl rm <stopped-pod>; kubelet restarts
7. Verify health
8. Document
Quarterly (full restore drill):
1. Pick snapshot from N days ago
2. Build sandbox host
3. Restore snapshot
4. Spin up cluster from snapshot
5. Verify API server, etcd, namespace visibility
6. Document; update runbook
Quiz
Knowledge check · 4 questions
Q1. What is the most cost-effective HA validation for production clusters?
Q2. A restore drill validates the snapshot-to-restore path but does not validate the cluster's HA during regular operation.
Q3. The team runs a quarterly restore drill against a sandbox. Walk the procedure.
Cluster: production. Snapshot: 12-day-old snapshot on S3. Sandbox: AWS EC2 instance with kubeadm and etcdctl installed.
Q4. What is the right cadence for an HA validation drill, and what should it cover?
Passing score: 75%. Answers are checked in this browser.
Production discipline
- Validate HA continuously. Drift accumulates; unnoticed HA regressions are a real risk.
- Quarterly restore drill. Validates snapshot integrity and operator ability.
- Monthly chaos test. Validates in-life HA (etcd member kill, control-plane host kill).
- Weekly synthetic checks. Daily API requests from the kubeconfig validate the basic path.
- Update the runbook from drill findings. A runbook that doesn’t change is a runbook that wasn’t exercised.
HA validation is the discipline that converts HA design into working HA. Operating it well is keeping the discipline.