Interview Prep/SRE & Reliability/Backups, DR & Runbook Automation

`etcdctl snapshot save` fails with `Error: context deadline exceeded`.

IntermediateTroubleshootingBackups, DR & Runbook Automation
Answer

Likely causes → etcdctl cannot reach or authenticate to etcd: missing TLS flags, wrong endpoint, or etcd is unhealthy.

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 health

Fix → Pass the CA, cert and key flags and the right endpoint to snapshot save, then verify with etcdutl snapshot status <file> -w table.

Prevent → Wrap etcd backups in a tested script or CronJob with alerting on failure and age.

All SRE & Reliability questions Roadmap: Backup & disaster recovery

More on Backups, DR & Runbook Automation