Skip to content

missing critical step for restore  #788

@porrascarlos802018

Description

@porrascarlos802018

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions