ETCD restore snapshot - data shows empty

After I restore ETCD backup to a --data-dir and point ETCD to the new location, I can’t seem to find any pods, nodes etc. Could there be a problem in my execution?

After restoring I edited the manifest of ETCD and added the new data location and adjusted the hostpath, however seeing no data makes me nervous if it would be considered a failure during exam?

First, read the docs on doing an etcd restore, In particular, you want to:

  1. Stop (all) kube-apiserver instances.
  2. Do the etcdctl restore command (for all etcd servers if you have more than one).
  3. Fix the configuration for etcd to point to the changed value of --data-dir.
  4. Restart etcd.
  5. Restart kube-apiserver.

Assuming you’re doing the CKA course, you should (re-)do the etcd backup/restore labs to make sure you’re confident about the process and get it to work consistently.

1 Like

Remember that if etcd is running as a pod (stacked etcd kubeadm cluster), you must edit the hostPath of the volume that mounts the etcd data, not the --data-dir argument to the etcd command.

1 Like