API calls are slow and the API server logs show `etcdserver: request timed out` and etcd logs show `apply request took too long` and `slow fdatasync`.
AdvancedTroubleshootingControl plane, RBAC, webhooks and autoscaling
Answer
Likely causes → etcd disk latency is too high: shared or burst-credit disks, noisy neighbours, or a large database (too many objects, huge Events, big Secrets). etcd needs fsync latency under ~10 ms.
Diagnose →
ETCDCTL_API=3 etcdctl --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 \
endpoint status --write-out=table
# Prometheus
histogram_quantile(0.99, rate(etcd_disk_wal_fsync_duration_seconds_bucket[5m]))
histogram_quantile(0.99, rate(etcd_disk_backend_commit_duration_seconds_bucket[5m]))
Fix → Move etcd to dedicated low-latency SSD (provisioned IOPS / local NVMe), reduce object churn (event TTL, delete stale objects), defragment if the DB is fragmented.
Prevent → Dedicated etcd disks, alerts on WAL fsync p99 > 10 ms and DB size, and regular defrag in maintenance windows.
More on Control plane, RBAC, webhooks and autoscaling
A developer gets `Error from server (Forbidden): pods is forbidden: User "[email protected]" cannot list resource "pods" in API group "" in the namespace "payments"`.BeginnerA CI pipeline fails with `deployments.apps "api" is forbidden: User "system:serviceaccount:ci:deployer" cannot patch resource "deployments" in API group "apps" in the namespace "prod"`.BeginnerA user can `get pods` but `kubectl logs` fails with `cannot get resource "pods/log"` and `kubectl exec` fails with `cannot create resource "pods/exec"`.BeginnerCreating a RoleBinding fails with `is attempting to grant RBAC permissions not currently held`.IntermediateEvery `kubectl apply` fails with `Internal error occurred: failed calling webhook "validate.kyverno.svc-fail": failed to call webhook: Post "https://kyverno-svc.kyverno.svc:443/validate/fail?timeout=10s": context deadline exceeded`.AdvancedCreating a Certificate fails with `failed calling webhook "webhook.cert-manager.io": ... no endpoints available for service "cert-manager-webhook"`.Intermediate