Back Up and Restore Kubernetes etcd Safely

8 steps · about 2 h 37 min · Intermediate

  1. Locate the cluster's etcd configuration (doc, Kubernetes Documentation, 20 min)

    Endpoints, certificates and storage layout differ between stacked and external etcd deployments.

  2. Separate snapshots from routine maintenance (doc, etcd Documentation, 22 min)

    Snapshots, compaction and defragmentation solve different operational problems and should not be conflated.

  3. Save a snapshot with explicit credentials (tutorial, etcd Documentation, 18 min)

    A repeatable command must address the intended endpoint and use the control plane's trusted client identity.

  4. Understand restore semantics and revision changes (doc, etcd Documentation, 26 min)

    Restore creates a new logical cluster and revision behavior matters to Kubernetes informers and cached state.

  5. Place recovery in the control-plane topology (doc, Kubernetes Documentation, 15 min)

    Stacked and external topologies require different coordination during a restore.

  6. Check endpoint and member health (tutorial, etcd Documentation, 14 min)

    Health and status checks establish a baseline before backup and confirm that restored members agree afterward.

  7. Choose post-restore API consistency checks (doc, Kubernetes Documentation, 12 min)

    Resource versions and API read semantics help define proof beyond an etcd process merely starting.

  8. Protect the snapshot and rehearse recovery (tutorial, etcd Documentation, 30 min)

    The database contains cluster secrets, so encrypted storage, access control and a timed rehearsal belong in the backup definition.