mirror of
https://github.com/kelseyhightower/kubernetes-the-hard-way.git
synced 2025-08-08 11:52:41 +03:00
add the --data-dir option
This commit is contained in:
@@ -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.
|
||||
|
||||
|
Reference in New Issue
Block a user