website
website copied to clipboard
missing critical step for restore
step to correctly update the etcd is not provided in this document
URL: https://kubernetes.io/docs/tasks/administer-cluster/configure-upgrade-etcd/
if you execute ETCDCTL_API=3 etcdctl snapshot restore /pathto/snapshot.db --data-dir /var/lib/etcd-from-backup --endpoints=https://127.0.0.1:2379 --cacert=/pathto/ca.crt --cert=/pathto/server.crt --key=/pathto/keyfile.key
the data restored and used by etcd needs to be redirected to the new path , what steps needs to be done and which commands to do it?
to restore
-
stop the kube-api server service : service kube-apiserver stop
-
ETCDCTL_API:3 etcdctl snapshot restore snapshot.db --data-dir /var/lib/etcd-from-backup #the path is the path of the backup file. in this case snapshot .db file. #a new data directory is created. in this case /var/lib/etcd-from-backup etcd is configured then to use the new path --data-dir=/var/lib/etcd-from-backup
*****MISSING update the /etc/kubernetes/manifests/etcd.yaml , change hostPath for the volume etcd-data from its old value to the new one ****
reload the service systemctl daemon-reload service etcd restart
start the api service kube-apiserver start
with kubeadm you always have to specify --endpoints --cacert --cert --key