etcd-io / etcd-io/website

missing critical step for restore

Open
#788 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
194
Forks
354
Avg merge
9d 12h
Merged PRs (30d)
3

Description

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
1. stop the kube-api server service :
service kube-apiserver stop

2. 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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.