Interview's MateKubernetes
Interview's Mate

Kubernetes

K8s · Workloads · GitOps · Cloud

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
Kubernetes topics
Lesson 133/ 160
07. Observability, Troubleshooting & SRE

Control Plane & etcd Performance Troubleshooting

Spot API latency and etcd health issues that slow the whole cluster.

Advancedetcd · API Latency · Control Plane3 quiz questions
Practice DevOps Q&A
In plain wordsDiagramTheoryStep by stepWhen to use itInterview cluesMistakes to avoidQuiz (3)Practice

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_duration and 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

Loading interactive 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.

Verify API Latency, not only object creation

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.

Key takeaway: etcd is implemented only when this invariant remains observable: 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.

Recover from API Latency drift

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.

Key takeaway: Accept the trade-off consciously: Scaling API replicas cannot repair an underpowered shared etcd disk, and aggressive compaction or snapshots still need a valid restore plan.

How it works, step by step

Step 1 of 4
SRE and service owner

1. 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.

etcd contract → owned state
Key numbers at this step
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_duration in 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_duration first: 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

Metrics and evidence-led diagnosis
Best for: Spot API latency and etcd health issues that slow the whole cluster. A concrete incident check is 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.

Ad-hoc console inspection
Best for: Quickly testing the API Latency assumption with 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.

Managed observability backend
Best for: Teams that need Control Plane integrated with guardrails; the evidence path is 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_duration without 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?
Interview tip: Interview sequence: state the invariant, run 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

Loading quiz

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.

Open DevOps Q&A →Tech Learn Q&A
Previous topic
Inspecting kubelet & Container Runtime Logs via journalctl & crictl
Next topic
DNS & CoreDNS Latency/Failure Diagnostics