Update etcd-backup-and-restore.md
parent
185bf10835
commit
587438e61d
|
@ -2,8 +2,27 @@
|
||||||
|
|
||||||
# 1. Get etcdctl utility if it's not already present.
|
# 1. Get etcdctl utility if it's not already present.
|
||||||
|
|
||||||
|
Reference: https://github.com/etcd-io/etcd/releases
|
||||||
|
|
||||||
```
|
```
|
||||||
go get github.com/coreos/etcd/etcdctl
|
ETCD_VER=v3.3.13
|
||||||
|
|
||||||
|
# choose either URL
|
||||||
|
GOOGLE_URL=https://storage.googleapis.com/etcd
|
||||||
|
GITHUB_URL=https://github.com/etcd-io/etcd/releases/download
|
||||||
|
DOWNLOAD_URL=${GOOGLE_URL}
|
||||||
|
|
||||||
|
rm -f /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
|
||||||
|
rm -rf /tmp/etcd-download-test && mkdir -p /tmp/etcd-download-test
|
||||||
|
|
||||||
|
curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-linux-amd64.tar.gz -o /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
|
||||||
|
tar xzvf /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -C /tmp/etcd-download-test --strip-components=1
|
||||||
|
rm -f /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
|
||||||
|
|
||||||
|
/tmp/etcd-download-test/etcd --version
|
||||||
|
ETCDCTL_API=3 /tmp/etcd-download-test/etcdctl version
|
||||||
|
|
||||||
|
mv /tmp/etcd-download-test/etcdctl /usr/bin
|
||||||
```
|
```
|
||||||
|
|
||||||
# 2. Backup
|
# 2. Backup
|
||||||
|
@ -33,6 +52,8 @@ ETCDCTL_API=3 etcdctl --endpoints=https://[127.0.0.1]:2379 --cacert=/etc/kuberne
|
||||||
|
|
||||||
# 4. Modify /etc/kubernetes/manifests/etcd.yaml
|
# 4. Modify /etc/kubernetes/manifests/etcd.yaml
|
||||||
|
|
||||||
|
Update ETCD POD to use the new data directory and cluster token 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 thisis a static pod placed under the `/etc/kubernetes/manifests` directory.
|
||||||
|
|
||||||
Update --data-dir to use new target location
|
Update --data-dir to use new target location
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue