An etcd Snapshot Alone Can't Rebuild a kubeadm Control Plane, So Back Up the PKI with It
An etcd snapshot holds every API object: Deployments, Services, ConfigMaps, Secrets, Nodes, RBAC. It does not hold the keys that make the cluster trust itself. kubeadm keeps those as files on the control plane, in /etc/kubernetes/pki:
| File | Signs or proves | Lost and regenerated means |
|---|---|---|
ca.key / ca.crt |
every kubelet, admin and component certificate | every kubeconfig and every node's kubelet stops trusting the API: nodes rejoin, kubeconfigs are reissued |
etcd/ca.key |
etcd's server and peer certificates | the restored etcd can't be reached by the API server with the old client certs |
sa.key / sa.pub |
ServiceAccount tokens | every token already mounted in a pod is rejected |
front-proxy-ca.key |
the aggregation layer (metrics-server and other API extensions) | extension APIs fail authentication |
So restoring a snapshot onto a rebuilt machine with freshly generated certificates gives back the objects, but none of the trust around them. Back up the PKI directory with the snapshot, as one bundle, and treat the bundle as a secret: whoever holds ca.key can mint a cluster-admin certificate.
What a Restore Needs
- Same identity: same hostname, IP and VIP, so the member name and peer URL in the etcd manifest still match (see kubeadm Uses the Hostname as the Node Name, So Name a Node Before It Joins).
- The PKI back in place before etcd and the API server start, then the snapshot restored into the data directory with
etcdutl snapshot restore. - Revisions moved forward: controllers and watchers cache the last revision they saw, which can be newer than the snapshot. etcd 3.6's
etcdutlcan--bump-revisionand--mark-compacted, which forces them to re-list instead of trusting stale caches; restart controllers that still misbehave. - Anything written after the snapshot is gone, so the snapshot interval is the cluster's recovery point objective.
A Backup Counts Once a Restore Works
A snapshot file can be truncated or written from an unhealthy member. etcdutl snapshot status only reports its hash, revision and key count, and etcdutl snapshot restore checks the integrity hash that etcdctl snapshot save appended, but only a restore you actually run proves the backup works: restore it into a throwaway etcd on another port, read it, and compare the key counts with the live one. That drill never touches the running cluster, so it can run on a schedule.
High availability doesn't replace any of this: three members replicate a mistaken delete as faithfully as a good write (see Two etcd Members Tolerate No More Failures Than One, So Go from One Control Plane to Three).
References
- etcd documentation: Disaster recovery -
snapshot save,etcdutl snapshot restore, and the revision-bump flags (last checked 2026-11). - Kubernetes documentation: Operating etcd clusters for Kubernetes - snapshots with
etcdctl, restoring, and restarting components afterwards (last checked 2026-11). - Kubernetes documentation: PKI certificates and requirements - what each file in
/etc/kubernetes/pkiis for. - Back Up and Restore etcd on a kubeadm Cluster - the procedure.
- A Certificate Authority Is the Key Everyone Trusts, So a New One Invalidates Every Certificate It Signed - what the CA is and why a new one breaks everything it signed.
- An etcd Snapshot Rolls the Whole Cluster Back, So Restore Only When Re-Applying Can't Fix It - when a restore is the right fix.
- Kubernetes MOC - hub for Kubernetes notes.
Review cards
Flashcard Why can't an etcd snapshot alone rebuild a kubeadm control plane on a new machine?
It holds the API objects but not /etc/kubernetes/pki. New CA and ServiceAccount keys mean nodes, kubeconfigs and pod tokens no longer trust the cluster.
Quiz After restoring etcd with a newly generated `sa.key`, what breaks first?
- The etcd member can't start
- ServiceAccount tokens already mounted in pods are rejected
- Deployments disappear from the API
- The kube-vip address moves to another node
sa.key signs ServiceAccount tokens; a new key invalidates every token signed with the old one.
Flashcard Why restore a snapshot into a throwaway etcd on a schedule?
A file that exists isn't a backup until it restores. A drill on another port proves it without touching the live cluster.