Browse questions, read quick answers, or expand full article breakdowns on demand. Filter by level, domain, or completion status using the sidebar dashboard.
Showing 69 of 69 questionsClick any card to load the whole article
expert•Cluster Architecture, Installation & Configuration•40 min•+25 XP
Debugging in a Highly Distributed Kubernetes Environment: Architecture & Implementation
Question
Your microservices platform has 200+ services across 3 clusters. Users report intermittent 5-second latency spikes affecting checkout. The issue is non-reproducible locally, affects only ~2% of requests, and disappears before you can investigate. Walk through your systematic debugging approach.
advanced•Workloads & Scheduling•8 min•+20 XP
GitLab CI/CD Integration: Automated Container Builds and Manifest Deployments
Question
How do you configure a GitLab CI/CD pipeline to build container images, update Kubernetes manifests, and execute secure deployments to a Kubernetes cluster using ServiceAccounts?
beginner•Cluster Architecture, Installation & Configuration•2 min•+10 XP
Kubernetes Architecture: Why Container Orchestration is Essential
Question
Why is container orchestration essential when running containerized applications at scale, and what core problems does Kubernetes solve compared to manual container management?
intermediate•Workloads & Scheduling•8 min•+15 XP
Production Deployment Design: Stateless Scalable Web Applications with HPA
Question
How do you architect a production-ready stateless web application deployment in Kubernetes combining Deployments, HPA, PodDisruptionBudgets, and anti-affinity rules for high availability?
expert•Cluster Architecture, Installation & Configuration•45 min•+25 XP
Advanced Networking: Network Policies and Service Mesh
Question
Your platform team must implement zero-trust networking for a financial services application. Requirements: all inter-service communication must be mutually authenticated and encrypted, no pod should communicate with any other pod unless explicitly allowed, east-west traffic must be auditable, and the solution must not require application code changes. Design and implement this.
advanced•Workloads & Scheduling•5 min•+20 XP
GitOps Workflow: Declarative Infrastructure Management with ArgoCD and Flux
Question
How does the GitOps pull-based architecture (using ArgoCD or Flux) differ from traditional push-based CI/CD pipelines, and how does it detect and reconcile cluster state drift automatically?
beginner•Cluster Architecture, Installation & Configuration•2 min•+10 XP
Manual Operations vs. Kubernetes: Problems Automated Orchestration Solves
Question
What specific operational problems arise when managing containers manually across multiple hosts, and how does Kubernetes automate self-healing, scaling, and service discovery?
intermediate•Workloads & Scheduling•4 min•+15 XP
Sidecar, Ambassador, and Adapter Patterns: Advanced Multi-Container Pod Designs
Question
How do the Sidecar, Ambassador, and Adapter multi-container Pod patterns enhance application functionality, and when should you use each pattern in production?
intermediate•Workloads & Scheduling•4 min•+15 XP
Sidecar, Ambassador, and Adapter Patterns: Advanced Multi-Container Pod Designs
Question
What are the key architectural differences between Sidecar, Ambassador, and Adapter pod patterns, and how do they extend containerized workloads without modifying primary application code?
beginner•Cluster Architecture, Installation & Configuration•3 min•+10 XP
Containers vs. Virtual Machines: Isolation Mechanisms at the Linux Kernel Level
Question
Explain the architecture, failure modes, and operational best practices for Containers vs. Virtual Machines: Isolation Mechanisms at the Linux Kernel Level in production Kubernetes environments.
expert•Cluster Architecture, Installation & Configuration•52 min•+25 XP
Custom Controllers and Operators Development: Architecture & Implementation
Question
Your platform team needs to automate database provisioning. Every time a developer creates a `Database` custom resource, the system should automatically provision a PostgreSQL StatefulSet, a Service, a Secret with credentials, and register the database in your internal service catalog — then clean everything up when the resource is deleted. Build this operator.
intermediate•Cluster Architecture, Installation & Configuration•5 min•+15 XP
Debugging Pending Pods: Systematic Troubleshooting for Scheduling Blocks
Question
Explain the architecture, failure modes, and operational best practices for Debugging Pending Pods: Systematic Troubleshooting for Scheduling Blocks in production Kubernetes environments.
advanced•Services & Networking•6 min•+20 XP
NetworkPolicies: Micro-Segmentation and Pod Traffic Filtering with Calico or Cilium
Question
How do Kubernetes NetworkPolicies enforce micro-segmentation and pod traffic isolation, and how do CNI plugins like Calico or Cilium implement these rules at the kernel network layer?
intermediate•Cluster Architecture, Installation & Configuration•5 min•+15 XP
CrashLoopBackOff Troubleshooting: Root Cause Analysis for Application Container Crashes
Question
Explain the architecture, failure modes, and operational best practices for CrashLoopBackOff Troubleshooting: Root Cause Analysis for Application Container Crashes in production Kubernetes environments.
beginner•Cluster Architecture, Installation & Configuration•2 min•+10 XP
Docker vs. Kubernetes: Runtime Engines vs. Cluster Orchestrators
Question
Explain the architecture, failure modes, and operational best practices for Docker vs. Kubernetes: Runtime Engines vs. Cluster Orchestrators in production Kubernetes environments.
expert•Cluster Architecture, Installation & Configuration•45 min•+25 XP
Prerequisite knowledge: etcd Raft consensus, Kubernetes control plane architecture, Linux I/O fundamentals
Question:
Your 500-node production cluster is experiencing API server latency spikes. Investigation shows etcd is the bottleneck: etcd_disk_wal_fsync_duration_seconds P99 is 150ms (should be <10ms), leader elections are happening frequently, and the etcd database size is approaching 8GB. Walk through your complete etcd performance diagnosis and remediation plan.
Quick Answer:
The symptoms point to three distinct problems: slow disk I/O (WAL fsync >10ms means etcd storage needs NVMe SSDs with dedicated disks), database bloat requiring compaction and defragmentation, and potential network latency causing leader elections. Fix disk I/O first, then compact/defrag, then tune heartbeat intervals.
Detailed Answer
️ etcd Architecture — Why Performance Matters
Every Kubernetes API write goes through this path:
kubectl apply → API Server → etcd leader
│
Raft consensus
(must replicate to
majority of members)
│
┌─────────────┼─────────────┐
│ │ │
etcd-1 etcd-2 etcd-3
(leader) (follower) (follower)
│
WAL write (fsync to disk)
│
Response to API Server
│
Response to kubectl
If WAL fsync takes 150ms:
→ Every write takes ≥150ms
→ API server appears slow
→ Controllers fall behind
→ Cluster feels unresponsive
️ Diagnosis: Step-by-Step
Step 1: Collect etcd Metrics
# Port-forward to etcd metrics endpoint
kubectl port-forward -n kube-system etcd-master-01 2381:2381
# Check the critical performance metrics
curl -s http://localhost:2381/metrics | grep -E \
"etcd_disk_wal_fsync|etcd_disk_backend_commit|etcd_server_leader|etcd_mvcc_db_total_size|etcd_network_peer_round_trip"
# Key metrics to examine:
# etcd_disk_wal_fsync_duration_seconds → Should be P99 < 10ms
# etcd_disk_backend_commit_duration_seconds → Should be P99 < 25ms
# etcd_server_leader_changes_seen_total → Should be near 0 (no frequent elections)
# etcd_mvcc_db_total_size_in_bytes → Watch for growth toward quota (8GB default)
# etcd_network_peer_round_trip_time_seconds → Should be P99 < 50ms between members
# Use etcdctl for direct diagnosis
export ETCDCTL_API=3
export ETCDCTL_ENDPOINTS="https://127.0.0.1:2379"
export ETCDCTL_CACERT="/etc/kubernetes/pki/etcd/ca.crt"
export ETCDCTL_CERT="/etc/kubernetes/pki/etcd/server.crt"
export ETCDCTL_KEY="/etc/kubernetes/pki/etcd/server.key"
# Check cluster health and leader
etcdctl endpoint health --cluster
etcdctl endpoint status --cluster -w table
# Output:
# ENDPOINT ID STATUS IS LEADER IS LEARNER RAFT TERM RAFT INDEX
# https://10.0.1.1:2379 8e9e05c52164694d healthy true false 42 1073741824
# https://10.0.1.2:2379 91bc3c398fb3c146 healthy false false 42 1073741824
# https://10.0.1.3:2379 fd422379fda50e48 healthy false false 42 1073741824
# Check database size
etcdctl endpoint status --cluster -w json | \
jq '.[] | {endpoint: .Endpoint, dbSize: (.Status.dbSize / 1024 / 1024 | floor | tostring + " MB")}'
# Check number of keys and revisions
etcdctl get "" --prefix --keys-only | wc -l # Total key count
etcdctl get "" --prefix --count-only # Key count (faster)
# Disk I/O diagnosis — the most common culprit
# Check disk type and performance on etcd nodes
ssh etcd-node-01
# Check if etcd is on SSD or spinning disk
lsblk -d -o NAME,ROTA,TYPE,SIZE,MODEL
# ROTA=0 means SSD, ROTA=1 means HDD (bad for etcd!)
# Measure actual disk latency
fio --name=etcd-test \
--ioengine=sync \
--rw=write \
--bs=2300 \ # etcd WAL write size
--size=22m \
--nrfiles=1 \
--runtime=60 \
--numjobs=1 \
--filename=/var/lib/etcd/test-write \
--output-format=json | \
jq '.jobs[0].write | {
iops: .iops,
latency_p99_us: .lat_ns.percentile."99.000000" / 1000,
latency_p99_ms: .lat_ns.percentile."99.000000" / 1000000
}'
# Target: P99 write latency < 10ms (10,000 microseconds)
# NVMe SSD: ~100-500µs ✅ Excellent
# SATA SSD: ~1-5ms ✅ Good
# Network SSD (EBS gp3): ~1-5ms ⚠️ Acceptable with io2
# HDD: ~10-20ms ❌ Too slow
# EBS gp2: ~5-20ms ❌ Unpredictable, avoid
# Check if etcd WAL and data are on the same disk (bad) or separate (good)
ls -la /var/lib/etcd/
# Ideally: WAL on one dedicated NVMe, data on another
Step 2: Database Compaction and Defragmentation
# Step 2a: Compact old revisions
# etcd keeps all historical revisions by default — this grows forever
# Get the current revision number
REVISION=$(etcdctl endpoint status --cluster -w json | \
jq -r '.[0].Status.header.revision')
echo "Current revision: $REVISION"
# Compact all revisions older than current
# This marks old data as reclaimable but doesn't free disk space yet
etcdctl compact $REVISION
# Compacted revision 1073741824
# Step 2b: Defragment each member (DO ONE AT A TIME — takes the member offline briefly)
# Defragmentation actually reclaims the disk space from compaction
for ENDPOINT in \
"https://10.0.1.1:2379" \
"https://10.0.1.2:2379" \
"https://10.0.1.3:2379"; do
echo "Defragmenting $ENDPOINT..."
etcdctl defrag --endpoints=$ENDPOINT
echo "Done. Sleeping 30s before next member..."
sleep 30
done
# Verify size reduction
etcdctl endpoint status --cluster -w table
# DB SIZE should decrease significantly (e.g., 8GB → 2GB)
# Step 2c: Set up automatic compaction to prevent future bloat
# Add to etcd startup flags:
# Option A: Periodic compaction (compact every 1 hour)
--auto-compaction-mode=periodic
--auto-compaction-retention=1h
# Option B: Revision-based compaction (keep last 1000 revisions)
--auto-compaction-mode=revision
--auto-compaction-retention=1000
# For most production clusters, periodic with 1h retention is recommended
# It balances history preservation with storage management
Step 3: Tuning etcd Configuration
# /etc/kubernetes/manifests/etcd.yaml (static pod manifest)
apiVersion: v1
kind: Pod
metadata:
name: etcd
namespace: kube-system
spec:
containers:
- name: etcd
image: registry.k8s.io/etcd:3.5.10-0
command:
- etcd
# Identity
- --name=etcd-01
- --data-dir=/var/lib/etcd
# Separate WAL onto dedicated disk (most impactful change)
- --wal-dir=/var/lib/etcd-wal # Mount a dedicated NVMe here
# Cluster configuration
- --initial-cluster-state=existing
- --initial-cluster=etcd-01=https://10.0.1.1:2380,etcd-02=https://10.0.1.2:2380,etcd-03=https://10.0.1.3:2380
# Heartbeat and election tuning
# Default: heartbeat=100ms, election=1000ms
# For cross-datacenter (higher latency): increase these
- --heartbeat-interval=250 # ms — increase if network RTT > 100ms
- --election-timeout=2500 # ms — should be 10x heartbeat-interval
# Quota: increase from 2GB default to avoid "etcdserver: mvcc: database space exceeded"
- --quota-backend-bytes=8589934592 # 8GB
# Auto-compaction (prevents unbounded growth)
- --auto-compaction-mode=periodic
- --auto-compaction-retention=1h
# Snapshot tuning
- --snapshot-count=10000 # Snapshot every 10k commits (default 100k)
# Lower = more frequent snapshots = faster recovery
# Higher = fewer I/O spikes from snapshotting
# TLS configuration
- --cert-file=/etc/kubernetes/pki/etcd/server.crt
- --key-file=/etc/kubernetes/pki/etcd/server.key
- --trusted-ca-file=/etc/kubernetes/pki/etcd/ca.crt
- --peer-cert-file=/etc/kubernetes/pki/etcd/peer.crt
- --peer-key-file=/etc/kubernetes/pki/etcd/peer.key
- --peer-trusted-ca-file=/etc/kubernetes/pki/etcd/ca.crt
- --client-cert-auth=true
- --peer-client-cert-auth=true
# Resource limits for the etcd container itself
resources:
requests:
cpu: "2"
memory: "8Gi"
limits:
cpu: "4"
memory: "16Gi"
volumeMounts:
- mountPath: /var/lib/etcd
name: etcd-data
- mountPath: /var/lib/etcd-wal
name: etcd-wal # Dedicated WAL disk mount
volumes:
- name: etcd-data
hostPath:
path: /var/lib/etcd
type: DirectoryOrCreate
- name: etcd-wal
hostPath:
path: /var/lib/etcd-wal # Backed by dedicated NVMe
type: DirectoryOrCreate
Step 4: OS-Level Tuning for etcd Nodes
# Priority: etcd must not be CPU-starved or memory-swapped
# 1. Disable swap (memory pressure causes etcd latency spikes)
swapoff -a
sed -i '/swap/d' /etc/fstab
# 2. Set CPU governor to performance mode
for cpu in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do
echo performance > $cpu
done
# 3. Increase file descriptor limits
cat >> /etc/security/limits.conf << EOF
* soft nofile 65536
* hard nofile 65536
* soft nproc 65536
* hard nproc 65536
EOF
# 4. Tune I/O scheduler for NVMe (use none/mq-deadline, not cfq)
echo "none" > /sys/block/nvme0n1/queue/scheduler
# OR for SATA SSD:
echo "mq-deadline" > /sys/block/sda/queue/scheduler
# 5. Tune kernel network parameters for etcd peer communication
cat >> /etc/sysctl.conf << EOF
# Increase TCP buffer sizes for etcd peer traffic
net.core.rmem_max = 134217728
net.core.wmem_max = 134217728
net.ipv4.tcp_rmem = 4096 87380 134217728
net.ipv4.tcp_wmem = 4096 65536 134217728
# Reduce TCP keepalive for faster detection of dead peers
net.ipv4.tcp_keepalive_time = 60
net.ipv4.tcp_keepalive_intvl = 10
net.ipv4.tcp_keepalive_probes = 6
EOF
sysctl -p
# 6. Give etcd process higher I/O priority using ionice
ETCD_PID=$(pgrep etcd)
ionice -c 1 -n 0 -p $ETCD_PID # Real-time I/O class, highest priority
Step 5: Prometheus Alerts for etcd Health
# etcd-alerts.yaml
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: etcd-performance-alerts
namespace: monitoring
spec:
groups:
- name: etcd.performance
rules:
# Alert: WAL fsync too slow
- alert: EtcdHighFsyncDuration
expr: |
histogram_quantile(0.99,
rate(etcd_disk_wal_fsync_duration_seconds_bucket[5m])
) > 0.01
for: 5m
labels:
severity: critical
annotations:
summary: "etcd WAL fsync P99 > 10ms on {{ $labels.instance }}"
description: |
etcd WAL fsync duration is {{ $value | humanizeDuration }}.
This directly impacts API server write latency.
Check disk I/O performance on the etcd node.
# Alert: Frequent leader elections
- alert: EtcdHighLeaderChanges
expr: |
increase(etcd_server_leader_changes_seen_total[1h]) > 3
labels:
severity: critical
annotations:
summary: "etcd leader changed {{ $value }} times in the last hour"
description: |
Frequent leader elections indicate network instability or
resource contention. Check network latency between etcd
members and CPU/memory pressure on etcd nodes.
# Alert: Database size approaching quota
- alert: EtcdDatabaseSpaceWarning
expr: |
etcd_mvcc_db_total_size_in_bytes
/ etcd_server_quota_backend_bytes * 100 > 75
for: 10m
labels:
severity: warning
annotations:
summary: "etcd database at {{ $value }}% of quota"
description: |
etcd database is filling up. Run compaction and
defragmentation before it hits 100% and the cluster
enters read-only mode.
# Alert: Database exceeds quota (CRITICAL — cluster goes read-only)
- alert: EtcdDatabaseSpaceCritical
expr: |
etcd_mvcc_db_total_size_in_bytes
/ etcd_server_quota_backend_bytes * 100 > 95
for: 1m
labels:
severity: critical
page: "true"
annotations:
summary: "etcd database at {{ $value }}% of quota — IMMEDIATE ACTION REQUIRED"
description: |
etcd will enter read-only mode at 100%. The Kubernetes
control plane will stop accepting writes. Run compaction
and defragmentation IMMEDIATELY.
Runbook: https://wiki.mycompany.com/runbooks/etcd-quota-exceeded
# Alert: Slow peer network
- alert: EtcdHighNetworkPeerLatency
expr: |
histogram_quantile(0.99,
rate(etcd_network_peer_round_trip_time_seconds_bucket[5m])
) > 0.15
for: 5m
labels:
severity: warning
annotations:
summary: "etcd peer network P99 > 150ms on {{ $labels.instance }}"
description: |
High inter-peer latency causes slow consensus and may
trigger leader elections. Check network between etcd nodes.
Current P99: {{ $value | humanizeDuration }}
# Alert: Backend commit duration too slow
- alert: EtcdHighCommitDuration
expr: |
histogram_quantile(0.99,
rate(etcd_disk_backend_commit_duration_seconds_bucket[5m])
) > 0.025
for: 5m
labels:
severity: warning
annotations:
summary: "etcd backend commit P99 > 25ms on {{ $labels.instance }}"
description: |
Slow backend commits indicate disk saturation or
fragmentation. Consider defragmentation.
Step 6: etcd Backup and Recovery Runbook
#!/bin/bash
# etcd-backup.sh — Run as a CronJob daily
set -euo pipefail
BACKUP_DIR="/backup/etcd"
DATE=$(date +%Y%m%d-%H%M%S)
BACKUP_FILE="$BACKUP_DIR/etcd-snapshot-$DATE.db"
S3_BUCKET="s3://mycompany-etcd-backups"
RETENTION_DAYS=30
# Take snapshot
ETCDCTL_API=3 etcdctl snapshot save "$BACKUP_FILE" \
--endpoints=https://127.0.0.1:2379 \
--cacert=/etc/kubernetes/pki/etcd/ca.crt \
--cert=/etc/kubernetes/pki/etcd/server.crt \
--key=/etc/kubernetes/pki/etcd/server.key
# Verify snapshot integrity
ETCDCTL_API=3 etcdctl snapshot status "$BACKUP_FILE" -w table
if [ $? -ne 0 ]; then
echo "ERROR: Snapshot verification failed!"
exit 1
fi
# Upload to S3
aws s3 cp "$BACKUP_FILE" "$S3_BUCKET/$(basename $BACKUP_FILE)"
# Remove local files older than 7 days
find "$BACKUP_DIR" -name "etcd-snapshot-*.db" -mtime +7 -delete
# Remove S3 files older than retention period
aws s3 ls "$S3_BUCKET/" | \
awk '{print $4}' | \
while read file; do
file_date=$(echo "$file" | grep -oP '\d{8}')
cutoff=$(date -d "-${RETENTION_DAYS} days" +%Y%m%d)
if [[ "$file_date" < "$cutoff" ]]; then
aws s3 rm "$S3_BUCKET/$file"
fi
done
echo "Backup complete: $BACKUP_FILE"
# etcd-restore.sh — Disaster recovery procedure
# WARNING: This replaces ALL cluster state
set -euo pipefail
SNAPSHOT_FILE=$1 # Path to snapshot file
CLUSTER_NAME="production"
if [ -z "$SNAPSHOT_FILE" ]; then
echo "Usage: $0 <snapshot-file>"
exit 1
fi
echo "=== etcd Restore Procedure ==="
echo "Snapshot: $SNAPSHOT_FILE"
echo "WARNING: This will replace all cluster data. Press Ctrl+C to abort."
sleep 10
# Step 1: Stop the API server on all control plane nodes
# (Prevents new writes during restore)
for node in master-01 master-02 master-03; do
ssh $node "mv /etc/kubernetes/manifests/kube-apiserver.yaml /tmp/"
ssh $node "mv /etc/kubernetes/manifests/etcd.yaml /tmp/"
done
sleep 10 # Wait for pods to stop
# Step 2: Restore snapshot on EACH etcd member
# Must be done on all members simultaneously with same cluster config
for i in 1 2 3; do
NODE="etcd-0$i"
IP="10.0.1.$i"
ssh $NODE "
# Remove old data
rm -rf /var/lib/etcd/*
# Restore from snapshot
ETCDCTL_API=3 etcdctl snapshot restore $SNAPSHOT_FILE \
--name etcd-0$i \
--initial-cluster 'etcd-01=https://10.0.1.1:2380,etcd-02=https://10.0.1.2:2380,etcd-03=https://10.0.1.3:2380' \
--initial-cluster-token etcd-cluster-production \
--initial-advertise-peer-urls https://$IP:2380 \
--data-dir /var/lib/etcd
echo 'Restore complete on $NODE'
"
done
# Step 3: Restart etcd on all nodes
for node in master-01 master-02 master-03; do
ssh $node "mv /tmp/etcd.yaml /etc/kubernetes/manifests/"
done
sleep 30 # Wait for etcd cluster to form
# Step 4: Verify etcd cluster is healthy
ETCDCTL_API=3 etcdctl endpoint health --cluster
ETCDCTL_API=3 etcdctl endpoint status --cluster -w table
# Step 5: Restart API server
for node in master-01 master-02 master-03; do
ssh $node "mv /tmp/kube-apiserver.yaml /etc/kubernetes/manifests/"
done
echo "=== Restore complete. Verify cluster state with: kubectl get nodes ==="
Performance Benchmarks: What Good Looks Like
Metric
Target
Warning
Critical
WAL fsync P99
< 10ms
10–25ms
> 25ms
Backend commit P99
< 25ms
25–50ms
> 50ms
Peer RTT P99
< 50ms
50–150ms
> 150ms
Leader changes/hour
0–1
2–3
> 3
DB size vs quota
< 50%
50–75%
> 75%
Snapshot duration
< 30s
30–120s
> 120s
Request latency P99
< 100ms
100–500ms
> 500ms
️ Trade-offs & Alternatives
Decision
Option A
Option B
Recommendation
etcd storage
Local NVMe (fastest)
Network SSD (io2)
Local NVMe for production
WAL placement
Same disk as data
Dedicated disk
Dedicated disk eliminates contention
Compaction mode
Periodic (1h)
Revision-based
Periodic for predictability
Cluster size
3 members
5 members
3 for most; 5 for AZ redundancy
Heartbeat interval
100ms (default)
250ms (cross-DC)
Match to actual network RTT
Quota
2GB (default)
8GB
8GB for large clusters
️ Common Mistakes & Misconceptions
"etcd can run on shared nodes with workloads." — etcd is latency-sensitive and should run on dedicated nodes with no other workloads. A noisy neighbor doing disk I/O will cause fsync spikes and trigger leader elections.
"I can defragment all members simultaneously." — Defragmentation takes a member offline briefly. Defragmenting all members at once will take your etcd cluster down. Always defragment one member at a time.
"Compaction frees disk space." — Compaction only marks old revisions as reclaimable. Defragmentation actually reclaims the disk space. You need both steps.
"More etcd members means more reliability." — More members means more consensus overhead and slower writes. A 5-member cluster tolerates 2 failures but writes slower than a 3-member cluster. 7+ members are almost never beneficial.
"I can restore etcd on just one member." — Restoring from snapshot must be done on all members simultaneously with the same cluster token. Restoring only one member will cause split-brain.
Key Takeaway
etcd performance is the foundation of Kubernetes control plane health. The single most impactful improvement in most production clusters is moving etcd to dedicated NVMe SSDs with the WAL on a separate disk. Database compaction and defragmentation must be treated as regular operational tasks, not emergency procedures. Automate both with scheduled jobs and alert on quota usage long before it becomes critical — a cluster whose etcd hits 100% quota enters read-only mode and stops accepting any API writes, effectively halting all operations.
Self-Assessment Checklist
Can you explain the difference between compaction and defragmentation?
Can you describe why WAL fsync latency directly impacts API server response time?
Can you explain why defragmenting all etcd members simultaneously is dangerous?
Can you write the etcdctl commands to compact and defragment a cluster?
Can you explain what happens when etcd quota is exceeded?
Can you describe the correct restore procedure for a 3-member etcd cluster?
These questions cut across all difficulty levels and test your ability to synthesize multiple concepts into coherent solutions.
advanced•Cluster Architecture, Installation & Configuration•7 min•+20 XP
Kubernetes Disaster Recovery: Cluster Backup, etcd Snapshots, and Velero
Question
How do you design a comprehensive disaster recovery strategy for Kubernetes using etcd snapshots for control plane state and Velero for persistent volume backups?
beginner•Cluster Architecture, Installation & Configuration•5 min•+10 XP
Control Plane vs. Worker Nodes: Key Architecture Components of a Kubernetes Cluster
Question
Explain the architecture, failure modes, and operational best practices for Control Plane vs. Worker Nodes: Key Architecture Components of a Kubernetes Cluster in production Kubernetes environments.
expert•Cluster Architecture, Installation & Configuration•52 min•+25 XP
Multi-Cluster Strategy for a Geographically Distributed Company: Architecture & Implementation
Question
Your company operates in US-East, EU-West, and APAC. Compliance requires EU data to stay in EU (GDPR), US financial data to stay in US (SOX), and APAC to serve as a DR site for both regions. SLA is 99.95% (< 4.4 hours/year downtime). Design a complete multi-cluster strategy.
intermediate•Troubleshooting•4 min•+15 XP
OOMKilled Prevention: Container Memory Limits, Cgroups, and Linux OOM Killer
Question
What kernel mechanisms trigger an OOMKilled exit status for a container, and how do you configure container memory requests and cgroups limits to prevent out-of-memory container crashes?
advanced•Cluster Architecture, Installation & Configuration•6 min•+20 XP
Zero-Downtime Cluster Upgrades: Master Control Plane and Worker Maintenance
Question
What step-by-step workflow guarantees zero downtime when upgrading worker nodes and control plane components using `kubeadm`, `cordon`, and `drain`?
beginner•Cluster Architecture, Installation & Configuration•3 min•+10 XP
etcd Architecture: Distributed Key-Value Store for Kubernetes Cluster State
Question
Explain the architecture, failure modes, and operational best practices for etcd Architecture: Distributed Key-Value Store for Kubernetes Cluster State in production Kubernetes environments.
expert•Cluster Architecture, Installation & Configuration•20 min•+25 XP
How Do You Build a Custom Admission Webhook from Scratch?: Architecture & Implementation
Question
How do you construct and deploy a custom Kubernetes Admission Webhook from scratch, and what TLS certificate requirements must be satisfied for the API server to communicate with it securely?
intermediate•Services & Networking•5 min•+15 XP
Kubernetes Ingress Controllers: Layer 7 HTTP Routing and SSL/TLS Termination
Question
How does an Ingress Controller manage Layer 7 HTTP/HTTPS traffic routing and SSL/TLS termination, and how does it differ from a NodePort or LoadBalancer Service?
advanced•Cluster Architecture, Installation & Configuration•25 min•+20 XP
Your company runs a production Kubernetes cluster on v1.26. The security team has mandated an upgrade to v1.29 due to a CVE. You have 40 nodes, stateful workloads, and a 99.9% uptime SLA. Walk through your complete upgrade strategy.
advanced•Cluster Architecture, Installation & Configuration•30 min•+20 XP
Your organization must comply with SOC 2 and PCI-DSS. The security team requires that no container image with a Critical or High CVE reaches production, all Kubernetes manifests must comply with the CIS Kubernetes Benchmark, and secrets must never appear in source code or image layers. Design and implement a complete DevSecOps pipeline.
intermediate•Cluster Architecture, Installation & Configuration•4 min•+15 XP
CoreDNS Architecture: In-Cluster DNS Resolution and Service Record Lookup
Question
Explain the architecture, failure modes, and operational best practices for CoreDNS Architecture: In-Cluster DNS Resolution and Service Record Lookup in production Kubernetes environments.
beginner•Workloads & Scheduling•4 min•+10 XP
Understanding Pods: Why Kubernetes Groups Containers as the Smallest Deployable Unit
Question
Why does Kubernetes use a Pod—rather than a single container—as its smallest deployable unit, and how do containers inside the same Pod share network and storage namespaces?
expert•Cluster Architecture, Installation & Configuration•15 min•+25 XP
What Is OPA/Gatekeeper and How Does It Extend Admission Control?: Architecture & Implementation
Question
What is OPA/Gatekeeper, how does it integrate with Kubernetes Validating Admission Webhooks, and how do ConstraintTemplates define declarative cluster governance policies?
beginner•Cluster Architecture, Installation & Configuration•3 min•+10 XP
Control Plane vs. Worker Nodes: Responsibilities and Component Breakdown
Question
Explain the architecture, failure modes, and operational best practices for Control Plane vs. Worker Nodes: Responsibilities and Component Breakdown in production Kubernetes environments.
intermediate•Storage•5 min•+15 XP
Storage Persistence: PersistentVolumes, PersistentVolumeClaims, and StorageClasses
Question
How do PersistentVolumes, PersistentVolumeClaims, and StorageClasses decouple storage consumption from underlying cloud storage infrastructure in Kubernetes?
expert•Cluster Architecture, Installation & Configuration•15 min•+25 XP
How do you implement an admission policy using OPA/Gatekeeper or Kyverno to enforce that all containers deployed to a cluster originate exclusively from approved internal image registries?
You manage a critical payment processing API. It handles 10,000 requests/minute with no tolerance for dropped connections. How do you implement zero-downtime deployments?
advanced•Cluster Architecture, Installation & Configuration•27 min•+20 XP
Blue/Green and Canary Deployments with Argo Rollouts: Architecture & Implementation
Question
Your e-commerce platform releases features weekly. A bad release last quarter caused 30 minutes of downtime and lost $200K in revenue. Leadership now requires that all releases be validated against 5% of live traffic before full rollout, with automatic rollback if error rates exceed 1%. How do you implement this?
beginner•Cluster Architecture, Installation & Configuration•4 min•+10 XP
Inside kubectl apply: Execution Flow from API Server to Container Runtime
Question
What happens under the hood during a `kubectl apply` request from client-side YAML parsing, OpenAPI validation, authentication/authorization, admission webhooks, to etcd persistence?
intermediate•Troubleshooting•4 min•+15 XP
Resource Requests vs. Limits: CPU/Memory Scheduling and Throttling Policies
Question
What is the operational difference between CPU/memory resource requests and limits, and how does Kubernetes use requests for scheduling while using limits to enforce throttling and OOM eviction?
expert•Cluster Architecture, Installation & Configuration•15 min•+25 XP
What Are the Key Levers for etcd Performance Tuning?: Architecture & Implementation
Question
What are the primary performance tuning levers for etcd (such as heartbeat intervals, election timeouts, disk I/O priorities, and DB quota limits) to ensure cluster stability under heavy write loads?
advanced•Troubleshooting•22 min•+20 XP
Cluster Resource Exhaustion: Monitoring and Scaling Strategy
Question
Your cluster is running out of resources. Pods are stuck in `Pending` state, nodes are at 90% CPU, and the on-call engineer is getting paged at 2 AM. What monitoring and scaling strategies do you implement to prevent this and respond automatically?
expert•Cluster Architecture, Installation & Configuration•12 min•+25 XP
How Do You Benchmark and Monitor etcd Health in Production?: Architecture & Implementation
Question
How Do You Benchmark and Monitor etcd Health in Production?: Architecture & Implementation?
beginner•Workloads & Scheduling•3 min•+10 XP
Kubernetes Namespaces: Logical Cluster Isolation and Resource Scoping
Question
How do Kubernetes Namespaces provide logical cluster isolation and resource scoping, and what are the limitations of namespaces regarding security and network boundary isolation?
intermediate•Troubleshooting•4 min•+15 XP
Kubernetes QoS Classes: Guaranteed, Burstable, and BestEffort Pod Eviction Priorities
Question
How does Kubernetes assign Guaranteed, Burstable, and BestEffort Quality of Service (QoS) classes to Pods, and how does the kernel OOM killer use `oom_score_adj` to evict Pods during resource scarcity?
beginner•Cluster Architecture, Installation & Configuration•5 min•+10 XP
Essential kubectl Commands: Operations and Debugging Cheat Sheet
Question
Explain the architecture, failure modes, and operational best practices for Essential kubectl Commands: Operations and Debugging Cheat Sheet in production Kubernetes environments.
advanced•Troubleshooting•22 min•+20 XP
Exposed Secrets in ConfigMap: Incident Response
Question
A developer accidentally committed a database password and an AWS access key directly into a ConfigMap, which was then applied to the production cluster and pushed to a public GitHub repository. You're the on-call engineer. Walk through your complete incident response plan.
intermediate•Workloads & Scheduling•5 min•+15 XP
Liveness, Readiness, and Startup Probes: Health Check Configurations
Question
How do Liveness, Readiness, and Startup probes differ in purpose and behavior, and how do incorrect probe configurations cause cascading deployment failures or unnecessary restarts?
advanced•Cluster Architecture, Installation & Configuration•35 min•+20 XP
Advanced RBAC Design for Multi-Team Organization: Architecture & Implementation
Question
Your company has three engineering teams: Frontend (deploys React apps), Backend (deploys APIs and workers), and Database (manages PostgreSQL and Redis). Each team has developers, leads, and CI/CD service accounts. Design a complete RBAC system where teams can only access their own namespaces, leads can approve deployments, CI/CD can deploy but not delete, and platform engineers have cluster-wide admin access with audit trails.
beginner•Cluster Architecture, Installation & Configuration•3 min•+10 XP
Imperative vs. Declarative Management: Infrastructure as Code with Kubernetes Manifests
Question
What are the fundamental differences between imperative `kubectl` commands and declarative `kubectl apply` manifest management, and why is declarative management required for Production Infrastructure as Code?
intermediate•Storage•5 min•+15 XP
StatefulSets vs. Deployments: Managing Stateful Applications with Stable Identities
Question
Why are standard Deployments unsuitable for stateful applications like database clusters, and how do StatefulSets provide stable network identities, ordinal indices, and persistent storage bindings?
intermediate•Cluster Architecture, Installation & Configuration•3 min•+15 XP
DaemonSets: Running Node-Level Daemon Agents for Logging and Monitoring
Question
Explain the architecture, failure modes, and operational best practices for DaemonSets: Running Node-Level Daemon Agents for Logging and Monitoring in production Kubernetes environments.
beginner•Cluster Architecture, Installation & Configuration•2 min•+10 XP
Dry-Run Validation: Client-Side vs. Server-Side Mutation Testing
Question
Explain the architecture, failure modes, and operational best practices for Dry-Run Validation: Client-Side vs. Server-Side Mutation Testing in production Kubernetes environments.
advanced•Storage•30 min•+20 XP
StatefulSet Design for Database Pods: Architecture & Implementation
Question
You need to ensure a PostgreSQL database Pod maintains state across cluster updates, node failures, and rolling restarts. Design a production-grade StatefulSet with proper storage, backup, high availability, and operational runbook.
beginner•Cluster Architecture, Installation & Configuration•3 min•+10 XP
Anatomy of a Kubernetes Manifest: The Four Essential Structure Fields
Question
Explain the architecture, failure modes, and operational best practices for Anatomy of a Kubernetes Manifest: The Four Essential Structure Fields in production Kubernetes environments.
advanced•Services & Networking•35 min•+20 XP
Istio Traffic Management and Circuit Breaking: Architecture & Implementation
Question
Your payment service is experiencing cascading failures. When the downstream fraud-detection service becomes slow, payment service threads pile up waiting for responses, eventually exhausting the connection pool and causing payment service itself to fail. Implement circuit breaking, retry logic, timeout policies, and traffic mirroring using Istio to make this system resilient without changing application code.
intermediate•Cluster Architecture, Installation & Configuration•6 min•+15 XP
Kubernetes RBAC: Implementing Roles, ClusterRoles, and Bindings for Granular Security
Question
How do Role, ClusterRole, RoleBinding, and ClusterRoleBinding resources interact to enforce least-privilege authorization across namespaces and cluster-wide resources?
advanced•Workloads & Scheduling•30 min•+20 XP
Advanced Pod Scheduling: Affinity, Taints, and Topology
Question
You have a cluster with three node types: GPU nodes (expensive), high-memory nodes, and standard nodes. ML training jobs must run only on GPU nodes, memory-intensive analytics must prefer high-memory nodes, and web frontends must be spread across standard nodes in different AZs. Also, the GPU nodes should not accept any non-ML workloads. Implement this scheduling strategy.
beginner•Workloads & Scheduling•3 min•+10 XP
Labels vs. Annotations: Resource Selectors vs. Operational Metadata
Question
What is the structural and functional difference between Labels and Annotations in Kubernetes, and why should operational metadata never be used in label selectors?
intermediate•Cluster Architecture, Installation & Configuration•4 min•+15 XP
ServiceAccounts vs. User Accounts: Identity, Token Auth, and Pod Authorization
Question
What are the key architectural differences between ServiceAccounts and User Accounts in Kubernetes, and how does token projection work for Pod service account authentication?
beginner•Workloads & Scheduling•4 min•+10 XP
Pod Lifecycle States: Phase Transitions from Pending to Running and Termination
Question
What are the exact phase transitions a Pod undergoes from Pending to Running or Failed, and what conditions cause a Pod to remain stuck in Pending or CrashLoopBackOff?
advanced•Cluster Architecture, Installation & Configuration•8 min•+20 XP
What is the Kubernetes API Extension Model?: Architecture & Implementation
Question
How does the Kubernetes API extension model work using Custom Resource Definitions (CRDs) and custom controllers, and how does API aggregation differ from CRD registration?
advanced•Cluster Architecture, Installation & Configuration•10 min•+20 XP
How Do Validating vs. Mutating Admission Webhooks Differ?
Question
How do Mutating and Validating Admission Webhooks differ in execution order and purpose during an API server request, and how do you prevent webhooks from blocking cluster operations if they fail?
beginner•Workloads & Scheduling•3 min•+10 XP
Init Containers: Pre-initialization, Dependency Waiting, and Setup Execution
Question
How do Init Containers execute sequentially before main application containers start, and how can they be used for dependency waiting, schema migrations, and secure credential setup?
beginner•Cluster Architecture, Installation & Configuration•3 min•+10 XP
Deployments vs. ReplicaSets: Declarative Scaling and Pod Template Management
Question
Explain the architecture, failure modes, and operational best practices for Deployments vs. ReplicaSets: Declarative Scaling and Pod Template Management in production Kubernetes environments.
advanced•Cluster Architecture, Installation & Configuration•8 min•+20 XP
How Does etcd Store Kubernetes State Internally?: Architecture & Implementation
Question
How does etcd store Kubernetes cluster state internally using key-value MVCC (Multi-Version Concurrency Control), and how does the API server handle bbolt database compaction and revision watch streams?
beginner•Workloads & Scheduling•4 min•+10 XP
Kubernetes Deployment Spec: Pod Templates, Replicas, and Rollout Controls
Question
What key fields inside a Deployment specification control replica count, update strategy, and pod revision history, and how does a Deployment controller manage underlying ReplicaSets?
beginner•Workloads & Scheduling•4 min•+10 XP
Rolling Update Strategy: Zero-Downtime Deployment Control with maxSurge and maxUnavailable
Question
How do `maxSurge` and `maxUnavailable` parameters control rolling update rollouts, and how do you configure them to guarantee zero-downtime deployments under heavy traffic?
beginner•Services & Networking•4 min•+10 XP
Kubernetes Services: Stable Networking and Service Discovery for Transient Pods
Question
How do Kubernetes Services provide stable IP addresses and DNS endpoints for transient Pods, and how does kube-proxy update iptables/IPVS rules when Pod endpoints change?
beginner•Services & Networking•4 min•+10 XP
ClusterIP vs. NodePort vs. LoadBalancer vs. ExternalName: Service Type Selection
Question
What are the functional differences and use cases among ClusterIP, NodePort, LoadBalancer, and ExternalName service types, and how does packet routing work for each?
beginner•Cluster Architecture, Installation & Configuration•3 min•+10 XP
ConfigMaps: Decoupling Application Configuration from Container Images
Question
Explain the architecture, failure modes, and operational best practices for ConfigMaps: Decoupling Application Configuration from Container Images in production Kubernetes environments.
beginner•Storage•4 min•+10 XP
Kubernetes Secrets vs. ConfigMaps: Sensitive Data Storage and Base64 Limitations
Question
What are the technical differences between Secrets and ConfigMaps, why is Base64 encoding insufficient for secret security, and how should sensitive data be encrypted at rest in etcd?
beginner•Workloads & Scheduling•3 min•+10 XP
Kubernetes Self-Healing Mechanics: Automatic Restarts and Pod Rescheduling
Question
How does the Kubelet enforce self-healing mechanics through container restart policies and health probes, and how does the control plane reschedule Pods when a node dies?