Why Kubernetes etcd backup needs a written recovery plan before the first failure
If you run self-hosted Kubernetes, a loss of etcd is a loss of the cluster's memory. etcd holds the objects that define your cluster: Deployments, Services, ConfigMaps, RBAC bindings and Secrets. Without them, the API server has nothing to reconcile against, and workloads may keep running on nodes while no one can change, scale or recover them. The Kubernetes documentation on operating etcd clusters requires a backup plan for etcd data, and the commands it names, etcdctl snapshot save for backups and etcdutl for restores, are only the mechanics. A snapshot file sitting on a disk is not a recovery plan. The plan answers who restores, to which cluster, from which copy, in what order, and how long the team can expect the work to take.
Three things make this harder than it looks. First, snapshots contain Secrets. Unless you have configured encryption at rest, Secrets sit unencrypted in etcd, so every snapshot is a copy of your credentials, service account tokens and certificates. The backup store therefore needs the same access control, encryption and retention rules as the production secrets it holds. Second, restores are rarely rehearsed. A backup job that reports success says little about whether the snapshot restores into a working control plane, especially when the etcd members, certificates and endpoints have changed since the snapshot was taken. Third, persistent volumes sit outside etcd. A restored etcd can bring back a PersistentVolumeClaim whose data was never saved, so the plan must cover the storage layer separately.
Before the first failure, confirm the items your environment depends on: the etcd topology and member count, where snapshots are written and who can read them, how encryption at rest is configured, which storage backup tool covers your volumes, and the runbook owner for a lost-quorum event. Then schedule a restore drill into a non-production cluster and record the time it took. The Kubernetes high availability guide and your distribution's documentation will show which of these steps differ for your setup, and those differences belong in the written plan.
Which parts of a cluster hold state that must be protected
A Kubernetes cluster keeps its desired state in etcd, but recovering a cluster also depends on files outside etcd and on data inside persistent volumes. Each of the six parts below has a different failure mode, storage location and backup method, so a plan that covers only etcd snapshots leaves gaps.
etcd members and quorum
etcd holds every API object in the cluster, including Deployments, Services, RBAC bindings and Secrets. It runs either stacked on control plane nodes or as a separate external cluster, and the kubeadm high availability guide describes both topologies. Losing a majority of members stops writes, so confirm which topology you run, how many members you have and where each member's data directory lives on disk.
kubeadm HA guideSnapshot files from etcdctl
A snapshot created with etcdctl snapshot save is a point-in-time copy of the etcd keyspace. If it is missing, you cannot roll the cluster state back after corruption, a bad upgrade or an accidental deletion. Snapshots stored on the same node as etcd disappear with that node, so the copies need an off-cluster destination, a schedule and a retention rule that someone owns.
Restore path with etcdutl
Restoring a snapshot uses etcdutl rather than the client tool, and the restore must run against each member under a procedure you have rehearsed. Without a tested runbook, teams discover at outage time that paths, member names or peer URLs differ from the original cluster. Record the etcd and Kubernetes versions with every snapshot, and keep the restore binaries in the same version range.
Certificates and kubeadm configuration
Control plane certificates, the cluster CA key and the kubeadm configuration are not stored in etcd. They are on disk under the control plane configuration directory, and they are required to rebuild a node or to join a replacement member. Back them up encrypted to a separate location, and check that the CA private key is protected with the same care as the Secrets it can decrypt.
Encryption at rest configuration
Secrets are stored unencrypted in etcd by default, and encryption at rest depends on an EncryptionConfiguration file passed to the API server. An etcd snapshot restored without the matching encryption key cannot read those Secrets. Store the key material in a key management service you control, back up the configuration file separately from the snapshots, and test that a restored cluster can decrypt Secrets.
Secrets good practicesPersistent volume data outside etcd
Persistent volumes hold application data that etcd never sees. An etcd restore brings back the PersistentVolumeClaim objects but not the bytes behind them, so a database can point at an empty or mismatched volume. Plan volume snapshots or application-level backups for each storage class, and record which etcd snapshot matches which volume backup so the two can be restored to the same point in time.
Stacked or external etcd, and where snapshots should live
This table compares stacked and external etcd topologies from the kubeadm high availability guide, then the places a snapshot can be stored. Read each row against your restore process: the cost of a choice shows up during node handling, credential management and the order of steps when the cluster is down.
| Option | When it fits | Operational cost | Confirm with the platform team |
|---|---|---|---|
| Stacked etcd on control plane nodes | Smaller clusters where one team owns the control plane and nodes, and the lower node count is acceptable | etcd members are lost when a control plane node is rebuilt, so restores must account for member removal and re-adding on the same node | Whether etcd member replacement is scripted and rehearsed, and who holds the snapshot and node access together |
| External etcd cluster | Larger estates that want etcd lifecycle, backups and access managed separately from API server nodes | A second cluster to patch, monitor and back up, plus separate TLS credentials for kube-apiserver and etcd clients | Which team runs the external etcd, how its certificates rotate, and whether restore steps are documented for that tier |
| Snapshots in the same network | Fast restores and simple access during an incident | A network or site failure can take out both the cluster and its snapshots, so recovery depends on the same failure domain | Whether a copy exists outside the failure domain the cluster runs in |
| Snapshots in a separate account or site | Protection against loss of the primary account, data center or region | Extra credentials, network paths and transfer steps during restore, which lengthen recovery | Who can read the backup bucket or site, how keys are held, and how long a restore to the secondary location takes in practice |
| Offline media | Last-resort copies, air-gapped environments and long retention | Manual retrieval and verification steps; slow to restore and easy to leave stale if no schedule is enforced | How media is labeled, who signs it out, and when a restore from media was last tested |
How to set up etcd snapshot backups step by step
This sequence moves an etcd backup from a one-off command to a scheduled, encrypted, off-cluster routine with alerting, so a usable copy of cluster state exists before anything fails. Each step ends with a check that confirms it worked.
Confirm etcd membership and member count
The platform engineer responsible for the control plane lists the etcd members and confirms the cluster has an odd number of members, with five recommended for production according to the Kubernetes documentation. Stacked topologies run etcd on the control plane nodes, while external etcd runs on its own hosts, and the member list tells you which one you have. Record the endpoints, certificate paths and the current leader before you change anything. The step is done when the member list matches your inventory and every member reports healthy.
Take and verify a first snapshot
Run etcdctl snapshot save with the cluster endpoints and client certificates on one control plane node, writing the file to a local path with a timestamp in its name. Then check the file with etcdutl snapshot status, which reports the hash, revision, total keys and size. Store the snapshot only after the status output is clean, because a file that cannot be read is not a backup. The step is done when the status command returns a revision and key count that match the live cluster.
Schedule recurring snapshots from a dedicated host
Create a scheduled job, such as a systemd timer or cron entry, that runs the snapshot command on a control plane node or a separate backup host with read access to the etcd certificates. Keep the job's credentials limited to snapshot operations, and write each run to a dated file so older copies are not overwritten. Set the retention rule in the same job so old snapshots are pruned on a schedule you have agreed with the owners of the platform. The step is done when two or more scheduled runs have produced files that pass the same status check.
Encrypt each snapshot before it leaves the cluster
Encrypt every snapshot file on the backup host before any copy leaves it, using a key held in your key management service or an approved tool your security team has reviewed. Snapshots contain Secrets, which are stored unencrypted in etcd by default unless you have configured encryption at rest, so the backup inherits that exposure. Keep the encryption keys separate from the storage account that holds the encrypted files. The step is done when a test file decrypts with the stored key and fails to decrypt without it.
Copy snapshots to off-cluster storage with access logging
Upload the encrypted files to storage outside the cluster's failure domain, such as a separate account, region or data center you control, and enable access logging on that bucket or share. Restrict write access to the backup job and read access to a small named group, and review the logs on a set cadence. Confirm the storage provider's immutability or versioning options against your retention requirements. The step is done when you can retrieve a copy from the off-cluster location, decrypt it and pass the status check on a separate host.
Alert on missed or failed backup runs
Configure monitoring to raise an alert when a scheduled job does not start, exits with an error, produces a zero-size file, or does not upload to off-cluster storage within the window your team sets. Send the alert to a channel that someone watches outside working hours if your service levels require it. Use the job's exit status and a timestamp check on the newest remote file, since a job can succeed locally and still fail to deliver. The step is done when a deliberately broken test run triggers the alert and the alert is acknowledged by the on-call owner.
How snapshots, encryption and off-cluster storage connect
The flow starts at the etcd members, where a scheduled job takes a snapshot with etcdctl snapshot save. The snapshot is encrypted with a key that the backup team holds outside the cluster, then moved to storage in a separate trust boundary. The restore path runs the other way: an operator fetches and decrypts the snapshot, uses etcdutl to rebuild a member, and only then rejoins it to the cluster. A persistent volume backup stream runs alongside, so etcd and application data stay in step. Check that the key, the storage account and the cluster credentials sit in different administrative hands.
Snapshot, key and storage flow with trust boundaries and the restore path.
Backing up persistent volumes alongside etcd so state matches
etcd holds the cluster's objects, including PersistentVolumeClaims and PersistentVolumes, but it does not hold the data inside the volumes those objects point to. A restore from an etcd snapshot brings back the claims and their bindings exactly as they were at snapshot time, while the underlying storage may hold data from a different moment or be missing data entirely. The result can be a workload that starts cleanly against a volume that is older than the database it depends on, or a claim that binds to nothing. Treat the etcd snapshot and the volume backups as one recovery point, not two independent jobs.
Align the schedules so that each etcd snapshot has a volume backup taken close to it, and record the time window between them. Snapshot timing matters most for applications with their own consistency needs, such as databases that write to a volume and to external state. Ask the storage vendor or the owner of the CSI driver whether the driver supports volume snapshots through the Kubernetes VolumeSnapshot API, whether those snapshots are crash-consistent or application-consistent, whether they can be quiesced by a hook before the snapshot is taken, and whether snapshots are stored off the array or cluster that they protect. Confirm each capability in writing with the vendor, because driver features differ by storage backend and version, and some drivers support snapshots only for certain volume types.
Test the two backups together. Restore the etcd snapshot into a scratch cluster, restore the matching volume snapshots, and check that each stateful workload starts and that its data matches what the application expects. Record how long each restore took and which steps needed manual work. A restore drill that only checks that etcd comes back will miss the mismatches this section is about, so schedule the drill to cover both sides and repeat it after any change to the storage class, CSI driver or backup tool.
What drives the cost of an etcd backup and recovery program
This table lists the factors that raise or lower the effort of running etcd backups and restore readiness, with the direction each one pushes and how to keep it manageable. Read each row as a question to answer in your own environment before requesting a quote. The main takeaway is that the number of clusters, etcd members and storage locations multiplies work, while standardizing runbooks and scoping persistent volume backups keeps it contained.
| Driver | Why it changes effort | How to keep it down |
|---|---|---|
| Cluster count and size | Each cluster needs its own snapshot job, storage path, key handling and restore runbook, so effort grows with the number of clusters more than with node count. | Standardize one backup pattern across clusters and template the snapshot jobs and runbooks. |
| Number of etcd members and topology | Stacked etcd ties backups to control plane nodes, while an external etcd cluster adds a separate tier to snapshot, monitor and restore. | Choose one topology per platform and document which member to snapshot from. |
| Snapshot frequency | More frequent snapshots raise storage use, monitoring alerts and the number of failure checks the team must review. | Set frequency from the recovery point your business owners accept, and alert on failed snapshot jobs rather than checking manually. |
| Retention decisions | Longer retention multiplies stored snapshots, key rotation scope and the records needed to show what was kept and when. | Write a retention rule tied to policy and automate expiry, so pruning does not depend on manual cleanup. |
| Off-cluster storage locations | Each additional location adds access controls, replication checks, network paths and separate ownership to confirm. | Use the fewest locations that meet separation requirements, and confirm one owner for each. |
| Backup encryption and key systems | Encryption keys, key custody and rotation add approvals, access reviews and recovery steps for the key system itself. | Reuse the key management service already governed by your security team and document key recovery alongside snapshot recovery. |
| Persistent volume backup scope | Each storage class may need its own tool, consistency approach and restore test, and stateful workloads must be restored in step with etcd state. | Limit scope to stateful workloads that matter most and group volumes by storage class and application owner. |
| Air-gapped constraints | Offline environments need local storage targets, manual transfer of snapshots and restore tooling mirrored into the isolated network. | Pre-stage restore binaries and images on the isolated side and keep transfer procedures in the runbook. |
| Compliance evidence needs | Assessors may ask for schedules, job logs, encryption settings, access lists and restore test records, which must be collected and kept current. | Generate evidence from backup job logs and restore drill records as a routine output, not a special project. |
| Restore drills per year | Each drill requires a staging environment, a rebuilt cluster or member, data validation and a written result, so more drills mean more labor and environment cost. | Run a fixed drill set that covers quorum loss, single member loss and a full cluster restore, and reuse scripts between drills. |
Recovering from lost etcd quorum without guessing
Quorum is lost when a majority of etcd members can no longer respond, and the cluster stops accepting writes until enough members return. With the five-member production layout that the Kubernetes documentation recommends, the cluster tolerates two failed members; losing a third leaves no majority. The first decision is not technical. It is whether the failed members can be repaired in place, so that they rejoin with their data intact, or whether they must be rebuilt from a snapshot. Repair is faster and avoids rolling back state, but it only works if the members' data directories are still sound. Rebuilding from a snapshot restores the cluster to the moment the snapshot was taken, so every change made after that point is lost. Write down who makes that call, who approves a rollback to an older snapshot, and who communicates with application owners before anyone runs a command.
Before an incident, keep a written runbook with named decision owners and a frozen copy of the latest good snapshot, stored off the cluster and protected from deletion by the rotation job. Confirm the snapshot's integrity before you rely on it. The restore sequence generally runs in this order: stop the affected kube-apiserver instances, restore the snapshot into a new data directory with etcdutl snapshot restore, bring up one member at a time with the restored data, and then add the remaining members back so they sync from the new leader. Each step should have a named operator, a check that must pass before moving on, and a point where the team stops and escalates. Confirm every exact command, flag and data path against the etcd version you run, since restore procedures change between releases. The Kubernetes etcd operations guide is the starting reference, but your distribution may add its own steps.
Rehearse the full sequence in staging on a copy of production-shaped data before you need it in production. The rehearsal should time each step, expose missing credentials or certificates, and show whether your team can reach a working control plane without guessing. Record what the staging run revealed and update the runbook. Ask your distribution or platform vendor to confirm which recovery steps they support and which they would perform themselves, and agree on who holds a support escalation path during an incident. Run the rehearsal again after every etcd or Kubernetes upgrade, because a runbook that passed on the previous version may fail on the next.
Protecting snapshots, keys and Secrets inside every backup
An etcd snapshot is a complete copy of cluster state, and that includes Secrets. The four cards below cover what has to be protected around each snapshot: the encryption of the data itself, the keys that unlock it, the people and services allowed to touch it, and the record of who did.
Secrets sit in snapshots unencrypted
Kubernetes stores Secrets unencrypted in etcd by default, so every snapshot carries plaintext credentials unless encryption at rest is configured on the API server. Kubernetes secrets good practices guidance asks administrators to turn on encryption at rest, which means a snapshot taken from an encrypted cluster is only useful together with the matching encryption configuration. Check this before the first backup runs: confirm the encryption provider configuration exists, and confirm that a snapshot copy is treated as sensitive data in the same way as the Secrets it contains.
Secrets good practicesSeparate backup and cluster keys
The key that encrypts Secrets inside the cluster and the key that encrypts backup archives should be different keys, held under different custody. If one key leaks, a single compromise should not expose both live Secrets and every historical snapshot. Ask your team who can create, rotate and revoke each key, where the key material lives, and whether a restore can be performed without the person who holds the key being available.
Least-privilege access to backup storage
Backup buckets and restore credentials are high-value targets because a snapshot can reveal every Secret in the cluster. Give the backup job write-only access to its destination, give restore operators read access only during a drill or incident, and keep restore credentials out of the cluster they would rebuild. Review who holds these grants on a fixed schedule and remove grants that were issued for a one-time task.
Audit who reads and restores
Record every access to snapshot storage and every restore action, including the identity, time, source and destination. Pair storage access logs with Kubernetes audit logging so that a restored cluster's activity can be traced back to a named person or workload. Confirm with your security team where these logs are retained, who can alter them, and how long they are kept to match your internal policy and any regulatory requirement you operate under.
How restore drills prove the backup works before an incident
A restore drill is the only evidence that an etcd snapshot can rebuild a cluster. A successful etcdctl snapshot save run only proves that a file was written. The drill is a timed, recorded exercise on an isolated cluster, separate from production, where the team restores the latest snapshot with etcdutl snapshot restore, starts control plane members from the restored data directory, and records every step with its start and end time. Run it on a schedule, not only after a scare, and use the same runbook the on-call engineer would follow at 2 a.m. Confirm with your distribution's documentation how it expects members to be rebuilt, because stacked and external etcd topologies differ in which nodes you must recreate.
Pass criteria should be written down before the drill starts. At minimum, compare the restored cluster against the source: object counts per namespace and resource type, the health of etcd members and the API server, that the expected nodes rejoin and become Ready, and that a sample of workloads reaches the same state. Bring back workloads and persistent volumes from your volume backup tool, then confirm the data in them matches what you expect. Set your own targets for maximum acceptable restore time and data loss, since the drill is where you learn whether those numbers are realistic. Keep the timing log, the snapshot hash and name, the commands run, the comparison output and any sign-off as audit evidence.
Test the failure modes, not only the happy path. Use a deliberately corrupted snapshot to confirm your verification step rejects it before any member is touched. Remove or rotate away the encryption-at-rest key in the test environment to see whether the team can find and recover the correct key from your key management process. Let the backup credentials or object storage access expire to confirm that alerts fire and that someone owns the renewal. Each finding should change the runbook: a missing command, an unclear owner, a gap in key custody or a step that took far longer than planned gets a dated fix and a repeat run. A drill that finds nothing should prompt you to check whether the drill was hard enough.
Questions teams ask before building etcd backup and recovery
What does etcd backup and recovery work cost, and what drives the price?
The price depends on how many clusters you run, how they are built, and how much of the recovery design you want written down and tested. Cost has three parts: the design of snapshot schedules, off-cluster storage and key custody; the build of automation and monitoring; and the restore drills that prove the process works. Setup is largely one-time, while storage, snapshot monitoring and periodic drills recur. Cost rises with the number of clusters, with stacked versus external etcd topology, with encryption and key custody requirements, and with how much persistent volume backup must be coordinated. Ask any quote to list each deliverable, the environments covered, the drills included and who owns the runbooks afterward. DeployOpen does not publish prices; a quote follows from the written scope.
How long does setup take, and what depends on the environment?
Duration depends mostly on access and decisions, not on the snapshot command itself. Taking a snapshot with etcdctl snapshot save is quick to script, but the work around it takes time: confirming cluster topology, agreeing on a schedule, provisioning off-cluster storage with retention, deciding encryption and key ownership, and getting approvals from security and operations. Environments with restricted networks, air-gapped registries or change-control windows add steps. Ask for a timeline tied to named milestones and to the environments in scope, and confirm which items depend on your teams, such as storage accounts, KMS access and maintenance windows.
What must our team provide before the work starts?
A recovery design needs five things from you before work begins. Start with cluster access: a kubeconfig or equivalent with rights to reach etcd members and the control plane nodes, plus a test cluster for restore drills. Provide storage: an off-cluster location with defined retention, access controls and ideally separation from the cluster's own infrastructure. Provide key custody: who holds the keys used to encrypt backups, and how they are rotated and recovered. Provide a named owner who approves the schedule, accepts the runbook and answers for restore decisions. Provide change windows for drills. Ask the quote to list these inputs explicitly so gaps show up before the schedule slips.
Can our in-house team build etcd backup and recovery alone?
Often yes, if the team already operates Kubernetes control planes and has someone comfortable with etcd. The Kubernetes documentation covers the snapshot and restore commands, and the work is well understood. The harder parts are the ones that fail quietly: backups stored on the same nodes or the same failure domain as etcd, unencrypted backup files, unmonitored schedules, and restores that have never been rehearsed. Ask whether your team has tested a full restore on a separate cluster, whether anyone can perform it at 2 a.m. without the original builder, and who owns the runbook. If those answers are unclear, an outside review or a scoped build can close the gap, and your team keeps the operating knowledge.
How often should we test etcd restores?
Test restores on a schedule you can defend, and treat each drill as evidence. The right interval depends on how often cluster state changes, how quickly you must recover, and what your regulator or auditor expects. Run a restore into an isolated cluster, confirm the API objects and workloads come back, and record the snapshot used, the time taken and any gaps found. Retest after every Kubernetes minor upgrade, after changes to encryption configuration, and after changes to backup storage. Confirm your cadence with your compliance lead, and ask the quote to name what each drill produces, including the written result and the remediation list.
Do etcd snapshots alone satisfy audit requests?
Snapshots are one piece of evidence, not the whole answer. An auditor usually asks whether backups happen, where they are kept, who can access them, whether they are encrypted, and whether recovery has been proven. A snapshot file cannot show those things by itself. Pair snapshots with logs of each scheduled run, retention settings, access reviews of the storage location, encryption and key custody records, and restore drill reports. Note that Secrets are stored unencrypted in etcd by default, so backup files may contain sensitive data unless encryption at rest is configured. Confirm with your auditor which controls and records they expect, and do not treat DeployOpen's preparation work as an audit report, since independent auditors issue those.
How do persistent volume backups change the scope?
Persistent volume backups add a second recovery path and usually a second owner. An etcd snapshot restores Kubernetes objects such as Deployments, Services and PersistentVolumeClaims, but it does not contain the data held on the volumes themselves. Restoring the control plane without matching volume data can leave applications pointing at empty or out-of-date storage. The scope therefore grows to cover the storage driver or backup tool, consistency between volume and database snapshots, application quiescing, and the restore order. Ask any quote whether volume backups are in scope, which storage classes and applications are covered, and who owns the application-level recovery checks.
How DeployOpen scopes, builds and hands over etcd backup and recovery
DeployOpen approaches Kubernetes etcd backup and disaster recovery as a written, fixed-scope engagement inside your own infrastructure. We set up snapshot schedules, off-cluster storage and restore procedures, then test them before the work is handed over to your team.
How we scope
- Inventory every control plane topology, including whether etcd is stacked or external and how many members run.
- Record where snapshots must be stored, how long they are retained and which encryption keys protect them.
- Agree in writing whether persistent volume backups, restore drills and quorum-loss runbooks are in the fixed scope.
How we build
- Configure scheduled etcd snapshots with etcdctl snapshot save, with access controls and logging on the backup job.
- Encrypt backup artifacts and move them off-cluster to storage you control, with keys held in your key management service.
- Write and run restore drills in a non-production cluster, using etcdutl for restores, and record the results as evidence.
How we hand over
- Deliver runbooks for routine restores, quorum recovery and persistent volume recovery, each tested during the engagement.
- Document schedules, retention, key ownership, alert settings and the owner of each backup job in your own systems.
- Walk your platform and security teams through a live restore drill so they can repeat it without DeployOpen.
How we support
- Ongoing support, periodic restore testing and runbook updates are available as a retainer, scoped in writing.
- Retainers can cover re-running drills after Kubernetes upgrades, since version changes can affect backup and restore steps.
- Confirm with your team which support hours, response expectations and escalation paths apply before signing the scope.

