Ranjani Satish:
Hello everyone, I am struggling with the etcd restore in the kodekloud labs. I took a backup with the below command and checked the status of the backup to be successful.
ETCDCTL_API=3 etcdctl --endpoints=https://127.0.0.1:2379
–cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/server.crt --key=/etc/kubernetes/pki/etcd/server.key
snapshot save /opt/snapshot-pre-boot.db
Later when I tried doing a restore with the below command
ETCDCTL_API=3 etcdctl --data-dir /var/lib/etcd-snapshot snapshot restore /opt/snapshot-pre-boot.db --endpoints=https://127.0.0.1:2379
–cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/server.crt --key=/etc/kubernetes/pki/etcd/server.key
and also changed the hostpath of the data directory to etcd-snapshot.
The newly created static pod remains in pending state.
I deleted the static pod and it doesn’t get recreated.
Not sure what is going wrong.
Any help please?