Hey everyone, regarding the etcd restore, for me, we have an problem with Lesson . . .

Hinodeya:
Hey everyone, regarding the etcd restore, for me, we have an problem with Lesson 5 Topic 3, because the solution provided didn’t works properly mostly if you have etcd-client installed and running as a daemon. In this Topic even if you made a etcdctl restore the pods are not visible ? Anyone can clarify this point. As noted I have put the modification on the /var/lib/etcd-from-backup

Madhan Kumar:
are you checking in the kube-system namespace ?

Hinodeya:
kubectl get all -A man so yes :wink:

unnivkn:
where you updated this one : /var/lib/etcd-from-backup . Is it in hostPath under Volumes: of etcd.yaml?

Madhan Kumar:
for all the exercises that i did, etcd was deployed as a pod … i could not recall etcd deployed as a daemon .

Hinodeya:
just for exemple this command send nothing

ETCDCTL_API=3 etcdctl get cluster.name \
  --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

Hinodeya:
Yeah I know that but normally after the restore the pods should be visible and running

Hinodeya:
And the solution provided doesn’t works

Madhan Kumar:
try creating a new lab env .

Mayur Sharma:
@Hinodeya I have performed that lab yesterday and it worked like charm. Double cross the steps and parameters

Hinodeya:
@Mayur Sharma you see the pod running properly ?

Hinodeya:
after restore ?

Mayur Sharma:
I have bookmarked below page and always run as per it …
https://kubernetes.io/docs/tasks/administer-cluster/configure-upgrade-etcd/#backing-up-an-etcd-cluster

Yes, I saw the pods running that time

Hinodeya:
so you have two deployement and three service running as well ?

Mayur Sharma:
I just completed the lab again and here is the screen shot of last part

Hinodeya:
Copy the command to restore please

Hinodeya:
I have doubt

Mayur Sharma:
sure,
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 restore /opt/snapshot-pre-boot.db --data-dir=/var/lib/etcd-from-backup

Post this, change the volumes in /etc/kubernetes/manisfest/etcd.yaml

Hinodeya:
I did that also

Mayur Sharma:
wait for few minutes and check docker logs for etcd container to restart
docker ps a- | grep etcd