add the --data-dir option

This commit is contained in:
Mohamed Ayman
2021-02-03 01:57:07 +02:00
committed by GitHub
parent c7d96b3600
commit cfa90e2ef2

View File

@@ -53,6 +53,11 @@ ETCDCTL_API=3 etcdctl --data-dir /var/lib/etcd-from-backup \
Note: In this case, we are restoring the snapshot to a different directory but in the same server where we took the backup (**the controlplane node)**
As a result, the only required option for the restore command is the **--data-dir**.
# 4. Modify /etc/kubernetes/manifests/etcd.yaml
Update --data-dir to use new target location
```
--data-dir=/var/lib/etcd-from-backup
```
Update ETCD POD to use the new hostPath directory `/var/lib/etcd-from-backup` by modifying the pod definition file at `/etc/kubernetes/manifests/etcd.yaml`. When this file is updated, the ETCD pod is automatically re-created as this is a static pod placed under the `/etc/kubernetes/manifests` directory.