Restore etcd from backup

I am doing backup and restore etcd question 9 while doing restore
and I am facing below issue


How to fix?or what I missed doing?

I’m not seeing how you changed the YAML for etcd.yaml, but that’s likely your error. The minimum change you can make that will work would change where the hostPath in volumes is pointing. This is in the solution tab for question 9/9.

Yes this what I did in /etc/kubernetes/manifests/etcd/yaml I changed the --data-dir and hostpath volumes to match and be /var/lib/etcd-from-backup

If you changed the argument to --data-dir, you’ll need to change volumeMounts value as well; I don’t see that there.

The tip here is to not change --data-dir. Only change the hostPath.
The volume mount still provides the new host path as /var/lib/etcd as far as etcd itself is concerned.