Control Plane & etcd Performance Troubleshooting
Spot API latency and etcd health issues that slow the whole cluster.
In plain words
etcd is the control plane's ledger: a slow or contested ledger makes every controller wait even if worker nodes look healthy. The simple Kubernetes rule is: Control-plane diagnosis tracks apiserver request latency and errors, etcd proposal or apply latency, disk fsync, database size, leader changes, and network round trips.
Think of it like…
etcd is the control plane's ledger: a slow or contested ledger makes every controller wait even if worker nodes look healthy.
Where you’ve seen it
An SRE testing a diagnosis runs etcdctl endpoint status --cluster -w table; kubectl get --raw=/metrics | grep -E 'apiserver_request_duration|etcd_request_duration. Expected evidence: Control-plane diagnosis tracks apiserver request latency and errors, etcd proposal or apply latency, disk fsync, database size, leader changes, and network round trips. If the run instead shows this symptom, stop and restore the last known state: A slow etcd disk serializes durable writes and throttles large lists or compaction, while repeated leader churn causes request retries and controller queues.
Words you’ll hear
- etcd
- For this lesson, etcd is the controlling idea: Control-plane diagnosis tracks apiserver request latency and errors, etcd proposal or apply latency, disk fsync, database size, leader changes, and network round trips.
- API Latency
- API Latency is the checkpoint; run
etcdctl endpoint status --cluster -w table; kubectl get --raw=/metrics | grep -E 'apiserver_request_duration|etcd_request_durationand inspect the owner chain. A slow etcd disk serializes durable writes and throttles large lists or compaction, while repeated leader churn causes request retries and controller queues. - Control Plane
- Control Plane is the outcome to preserve; the cost is explicit: Scaling API replicas cannot repair an underpowered shared etcd disk, and aggressive compaction or snapshots still need a valid restore plan.
- Verification evidence
- The evidence command is
etcdctl endpoint status --cluster -w table; kubectl get --raw=/metrics | grep -E 'apiserver_request_duration|etcd_request_duration. It connects the declaration to this behavior: Spot API latency and etcd health issues that slow the whole cluster.
Visual diagram
Theory & deep dive
How etcd reaches the intended state
Spot API latency and etcd health issues that slow the whole cluster. Control-plane diagnosis tracks apiserver request latency and errors, etcd proposal or apply latency, disk fsync, database size, leader changes, and network round trips.
The concrete checkpoint is etcdctl endpoint status --cluster -w table; kubectl get --raw=/metrics | grep -E 'apiserver_request_duration|etcd_request_duration; compare the etcd owner, API Latency state, and Control Plane outcome instead of treating YAML acceptance as proof.
Run etcdctl endpoint status --cluster -w table; kubectl get --raw=/metrics | grep -E 'apiserver_request_duration|etcd_request_duration after the change and correlate the result with Events and the owning object. Control-plane diagnosis tracks apiserver request latency and errors, etcd proposal or apply latency, disk fsync, database size, leader changes, and network round trips.
API Latency: failure boundary and production cost
A slow etcd disk serializes durable writes and throttles large lists or compaction, while repeated leader churn causes request retries and controller queues. The prerequisite contract is concrete: Control-plane diagnosis tracks apiserver request latency and errors, etcd proposal or apply latency, disk fsync, database size, leader changes, and network round trips.
Scaling API replicas cannot repair an underpowered shared etcd disk, and aggressive compaction or snapshots still need a valid restore plan. A safe design limits blast radius, records the last good configuration, and uses etcdctl endpoint status --cluster -w table; kubectl get --raw=/metrics | grep -E 'apiserver_request_duration|etcd_request_duration as a deterministic rollback checkpoint.
Capture the current state with etcdctl endpoint status --cluster -w table; kubectl get --raw=/metrics | grep -E 'apiserver_request_duration|etcd_request_duration, then correct the controlling manifest rather than patching a child object; the relevant divergence signal is specific: A slow etcd disk serializes durable writes and throttles large lists or compaction, while repeated leader churn causes request retries and controller queues.
How it works, step by step
Step 1 of 41. Define the symptom and SLI
Turn the user symptom into a measurable question and select a telemetry source: Control-plane diagnosis tracks apiserver request latency and errors, etcd proposal or apply latency, disk fsync, database size, leader changes, and network round trips.
- Goal
- Spot API latency and etcd health issues that slow the whole cluster.
- Owner
- etcd
When to use it & trade-offs
What it is
Spot API latency and etcd health issues that slow the whole cluster. Control-plane diagnosis tracks apiserver request latency and errors, etcd proposal or apply latency, disk fsync, database size, leader changes, and network round trips.
Why it matters: A slow etcd disk serializes durable writes and throttles large lists or compaction, while repeated leader churn causes request retries and controller queues. The invariant at risk is specific: Control-plane diagnosis tracks apiserver request latency and errors, etcd proposal or apply latency, disk fsync, database size, leader changes, and network round trips. The quickest fact check before changing the design is etcdctl endpoint status --cluster -w table; kubectl get --raw=/metrics | grep -E 'apiserver_request_duration|etcd_request_duration.
When to reach for it
- Use etcd to enforce this invariant: Control-plane diagnosis tracks apiserver request latency and errors, etcd proposal or apply latency, disk fsync, database size, leader changes, and network round trips.
- Use API Latency evidence from
etcdctl endpoint status --cluster -w table; kubectl get --raw=/metrics | grep -E 'apiserver_request_duration|etcd_request_durationin reviews and incident timelines. Spot API latency and etcd health issues that slow the whole cluster. - Choose the managed observability backend route only when this cost is justified by governance or scale: Scaling API replicas cannot repair an underpowered shared etcd disk, and aggressive compaction or snapshots still need a valid restore plan.
When to avoid or be careful
- Avoid assuming etcd is complete after YAML submission; the required behavior is concrete: Control-plane diagnosis tracks apiserver request latency and errors, etcd proposal or apply latency, disk fsync, database size, leader changes, and network round trips.
- Avoid treating the next symptom as random; check the owner and state with
etcdctl endpoint status --cluster -w table; kubectl get --raw=/metrics | grep -E 'apiserver_request_duration|etcd_request_durationfirst: A slow etcd disk serializes durable writes and throttles large lists or compaction, while repeated leader churn causes request retries and controller queues. - Avoid adopting a heavier platform wrapper before measuring its cost: Scaling API replicas cannot repair an underpowered shared etcd disk, and aggressive compaction or snapshots still need a valid restore plan.
Native, manual, and managed paths for etcd
etcdctl endpoint status --cluster -w table; kubectl get --raw=/metrics | grep -E 'apiserver_request_duration|etcd_request_duration.Strengths: Control-plane diagnosis tracks apiserver request latency and errors, etcd proposal or apply latency, disk fsync, database size, leader changes, and network round trips.
Watch out: Scaling API replicas cannot repair an underpowered shared etcd disk, and aggressive compaction or snapshots still need a valid restore plan. Recovery must also recognize this signal: A slow etcd disk serializes durable writes and throttles large lists or compaction, while repeated leader churn causes request retries and controller queues.
etcdctl endpoint status --cluster -w table; kubectl get --raw=/metrics | grep -E 'apiserver_request_duration|etcd_request_duration; the expected invariant is: Control-plane diagnosis tracks apiserver request latency and errors, etcd proposal or apply latency, disk fsync, database size, leader changes, and network round trips.Strengths: etcdctl endpoint status --cluster -w table; kubectl get --raw=/metrics | grep -E 'apiserver_request_duration|etcd_request_duration gives immediate feedback without first building a platform layer.
Watch out: A manual change can hide drift, and unlike etcd, it does not make this symptom self-documenting: A slow etcd disk serializes durable writes and throttles large lists or compaction, while repeated leader churn causes request retries and controller queues.
etcdctl endpoint status --cluster -w table; kubectl get --raw=/metrics | grep -E 'apiserver_request_duration|etcd_request_duration.Strengths: Platform controls can wrap this exact behavior in policy or dashboards: Control-plane diagnosis tracks apiserver request latency and errors, etcd proposal or apply latency, disk fsync, database size, leader changes, and network round trips.
Watch out: The added platform ownership buys value at this cost: Scaling API replicas cannot repair an underpowered shared etcd disk, and aggressive compaction or snapshots still need a valid restore plan.
Interview signals & numbers to know
When this topic comes up
- Interview anchor: Control-plane diagnosis tracks apiserver request latency and errors, etcd proposal or apply latency, disk fsync, database size, leader changes, and network round trips.
- Trace etcd to Control Plane through API Latency; the invariant is: Control-plane diagnosis tracks apiserver request latency and errors, etcd proposal or apply latency, disk fsync, database size, leader changes, and network round trips.
- Recognize the symptom: A slow etcd disk serializes durable writes and throttles large lists or compaction, while repeated leader churn causes request retries and controller queues.
- Justify the cost: Scaling API replicas cannot repair an underpowered shared etcd disk, and aggressive compaction or snapshots still need a valid restore plan.
- Verify with etcdctl endpoint status --cluster -w table; kubectl get --raw=/metrics | grep -E 'apiserver_request_duration|etcd_request_duration instead of only inspecting YAML.
Benchmarks & rules of thumb
- 1
- etcd leader is required for linearizable writes at a time
- 3
- performance axes: fsync, proposal/apply, and network round trip
- 0
- healthy Pod count proves control-plane commit latency is acceptable
Common mistakes & follow-ups
Common interview mistakes
- Debugging only the child object misses the etcd owner contract: Control-plane diagnosis tracks apiserver request latency and errors, etcd proposal or apply latency, disk fsync, database size, leader changes, and network round trips.
- Ignoring this telltale condition leads to unrelated changes: A slow etcd disk serializes durable writes and throttles large lists or compaction, while repeated leader churn causes request retries and controller queues.
- Repeating
etcdctl endpoint status --cluster -w table; kubectl get --raw=/metrics | grep -E 'apiserver_request_duration|etcd_request_durationwithout an owner for remediation wastes retry cost. Scaling API replicas cannot repair an underpowered shared etcd disk, and aggressive compaction or snapshots still need a valid restore plan.
Likely interviewer follow-ups
- How would API output and runtime evidence prove this behavior: Control-plane diagnosis tracks apiserver request latency and errors, etcd proposal or apply latency, disk fsync, database size, leader changes, and network round trips?
- Which owner object, logs, and Events would you inspect for this symptom-A slow etcd disk serializes durable writes and throttles large lists or compaction, while repeated leader churn causes request retries and controller queues-?
- At what threshold would this cost become unacceptable: Scaling API replicas cannot repair an underpowered shared etcd disk, and aggressive compaction or snapshots still need a valid restore plan?
etcdctl endpoint status --cluster -w table; kubectl get --raw=/metrics | grep -E 'apiserver_request_duration|etcd_request_duration, name the failure, then justify the cost. Invariant: Control-plane diagnosis tracks apiserver request latency and errors, etcd proposal or apply latency, disk fsync, database size, leader changes, and network round trips. Failure: A slow etcd disk serializes durable writes and throttles large lists or compaction, while repeated leader churn causes request retries and controller queues. Cost: Scaling API replicas cannot repair an underpowered shared etcd disk, and aggressive compaction or snapshots still need a valid restore plan.Knowledge check
Put it into practice
Practice related interview Q&A
Apply Control Plane & etcd Performance Troubleshooting with generative AI interview Q&A and hands-on practice.