ETCD Backup & Restore issue #17188
-
Hello all, I have 3 node external etcd cluster in my kubernetes environment. I am using kubernetes version 1.21.5. I have taken snapshots for single node as well as for all 3 nodes and try to restore etcd. But i am facing issues as it is not working as expected. With single node snapshot restore, i got only one node started successfully while other 2 nodes failed to sync with first node. In 2nd scenario, i have taken snapshots of all 3 nodes and restored them with respective nodes but all nodes become leader and no one is follower. Please guide me for the issue. I am using below commands to take snapshot and restore. snapshot: ETCDCTL_API=3 etcdctl --endpoints=https://10.18.14.21:2379 --cacert=/etc/ssl/etcd/ssl/ca.pem --cert=/etc/ssl/etcd/ssl/member-ubuntu21.mcloud.com.pem --key=/etc/ssl/etcd/ssl/member-ubutnu21.mcloud.com-key.pem snapshot save /usr/local/share/packages/kubernetes/ETCD-SNAPSHOTS/etcd-snapshot.db Restore: ETCDCTL_API=3 etcdctl --endpoints=https://10.18.14.21:2379 --cacert=/etc/ssl/etcd/ssl/ca.pem --cert=/etc/ssl/etcd/ssl/member-ubuntu21.mcloud.com.pem --key=/etc/ssl/etcd/ssl/member-ubuntu21.mcloud.com-key.pem snapshot restore /usr/local/share/packages/kubernetes/ETCD-SNAPSHOTS/etcd-snapshot.db |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @paresh1492 - Thanks for your question, please note Kubernetes 1.21.5 is end of life and has been unsupported for over a year now so you should upgrade as soon as possible. In terms of the etcd cluster recovery, what version of etcd are you running? Please refer to https://etcd.io/docs/v3.5/op-guide/recovery/#restoring-a-cluster for an example sequence of commands for restoring a cluster from a snapshot file. |
Beta Was this translation helpful? Give feedback.
Hey @paresh1492 - Thanks for your question, please note Kubernetes 1.21.5 is end of life and has been unsupported for over a year now so you should upgrade as soon as possible.
In terms of the etcd cluster recovery, what version of etcd are you running?
Please refer to https://etcd.io/docs/v3.5/op-guide/recovery/#restoring-a-cluster for an example sequence of commands for restoring a cluster from a snapshot file.