From 8e8b2819ac51230d2139d0f74e402b632347d15e Mon Sep 17 00:00:00 2001 From: ganeshniyer Date: Mon, 22 Mar 2021 11:52:56 +0530 Subject: [PATCH 1/6] Update configure-upgrade-etcd.md to give an example use-case for snapshot using options given by etcdctl --- .../administer-cluster/configure-upgrade-etcd.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md b/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md index 25cd61a710..d393fcb013 100644 --- a/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md +++ b/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md @@ -269,6 +269,21 @@ If etcd is running on a storage volume that supports backup, such as Amazon Elastic Block Store, back up etcd data by taking a snapshot of the storage volume. +### Snapshot using etcdctl options + +We can also take the snapshot using various options given by etcdctl. For example + +```shell +ETCDCTL_API=3 etcdctl --h +``` + +will list various options avilable with etcdctl. If you want to take a snapshot by specifying various options available here, you can do so. For example, to take a snapshot by specifying the endpoint, certificates etc is as given below + +```shell +ETCDCTL_API=3 etcdctl --endpoints=[127.0.0.1:2379] --cacert= --cert= --key= snapshot save +``` +where, , and can be obtained by looking at the description of the etcd pod. + ## Scaling up etcd clusters Scaling up etcd clusters increases availability by trading off performance. From 955acb710d50c2f62b0298943a21e3a66c850a52 Mon Sep 17 00:00:00 2001 From: ganeshniyer Date: Mon, 22 Mar 2021 17:16:56 +0530 Subject: [PATCH 2/6] Update content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md Co-authored-by: Qiming Teng --- .../docs/tasks/administer-cluster/configure-upgrade-etcd.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md b/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md index d393fcb013..222a1687b7 100644 --- a/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md +++ b/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md @@ -277,7 +277,8 @@ We can also take the snapshot using various options given by etcdctl. For exampl ETCDCTL_API=3 etcdctl --h ``` -will list various options avilable with etcdctl. If you want to take a snapshot by specifying various options available here, you can do so. For example, to take a snapshot by specifying the endpoint, certificates etc is as given below +will list various options available from etcdctl. For example, you can take a snapshot by specifying +the endpoint, certificates etc as shown below: ```shell ETCDCTL_API=3 etcdctl --endpoints=[127.0.0.1:2379] --cacert= --cert= --key= snapshot save @@ -339,4 +340,3 @@ We also recommend restarting any components (e.g. `kube-scheduler`, stale data. Note that in practice, the restore takes a bit of time. During the restoration, critical components will lose leader lock and restart themselves. {{< /note >}} - From 483857e11b6a4199bb80e2891b3f863c497334a7 Mon Sep 17 00:00:00 2001 From: ganeshniyer Date: Mon, 22 Mar 2021 17:17:04 +0530 Subject: [PATCH 3/6] Update content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md Co-authored-by: Qiming Teng --- .../en/docs/tasks/administer-cluster/configure-upgrade-etcd.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md b/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md index 222a1687b7..232b260c53 100644 --- a/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md +++ b/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md @@ -283,7 +283,7 @@ the endpoint, certificates etc as shown below: ```shell ETCDCTL_API=3 etcdctl --endpoints=[127.0.0.1:2379] --cacert= --cert= --key= snapshot save ``` -where, , and can be obtained by looking at the description of the etcd pod. +where `trusted-ca-file`, `cert-file` and `key-file` can be obtained from the description of the etcd Pod. ## Scaling up etcd clusters From 57b7232ccbf389f575fcd977b8ad4b3db0795718 Mon Sep 17 00:00:00 2001 From: ganeshniyer Date: Mon, 22 Mar 2021 17:17:20 +0530 Subject: [PATCH 4/6] Update content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md Co-authored-by: Qiming Teng --- .../docs/tasks/administer-cluster/configure-upgrade-etcd.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md b/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md index 232b260c53..7fb4fd67bd 100644 --- a/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md +++ b/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md @@ -281,7 +281,9 @@ will list various options available from etcdctl. For example, you can take a sn the endpoint, certificates etc as shown below: ```shell -ETCDCTL_API=3 etcdctl --endpoints=[127.0.0.1:2379] --cacert= --cert= --key= snapshot save +ETCDCTL_API=3 etcdctl --endpoints=[127.0.0.1:2379] \ + --cacert=trusted-ca-file --cert=cert-file --key=key-file \ + snapshot save backup-file-location ``` where `trusted-ca-file`, `cert-file` and `key-file` can be obtained from the description of the etcd Pod. From d00a40c724ecd7f25384a7454d143f5889b9734f Mon Sep 17 00:00:00 2001 From: ganeshniyer Date: Wed, 24 Mar 2021 21:34:58 +0530 Subject: [PATCH 5/6] Update content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md Co-authored-by: Rey Lejano <52760880+reylejano@users.noreply.github.com> --- .../en/docs/tasks/administer-cluster/configure-upgrade-etcd.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md b/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md index 7fb4fd67bd..a7ee17f5e4 100644 --- a/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md +++ b/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md @@ -282,7 +282,7 @@ the endpoint, certificates etc as shown below: ```shell ETCDCTL_API=3 etcdctl --endpoints=[127.0.0.1:2379] \ - --cacert=trusted-ca-file --cert=cert-file --key=key-file \ + --cacert= --cert= --key= \ snapshot save backup-file-location ``` where `trusted-ca-file`, `cert-file` and `key-file` can be obtained from the description of the etcd Pod. From c10d270dc309761d035305215ba27275aede7041 Mon Sep 17 00:00:00 2001 From: ganeshniyer Date: Wed, 24 Mar 2021 21:35:19 +0530 Subject: [PATCH 6/6] Update content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md Co-authored-by: Rey Lejano <52760880+reylejano@users.noreply.github.com> --- .../en/docs/tasks/administer-cluster/configure-upgrade-etcd.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md b/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md index a7ee17f5e4..f0f6f5def9 100644 --- a/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md +++ b/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md @@ -283,7 +283,7 @@ the endpoint, certificates etc as shown below: ```shell ETCDCTL_API=3 etcdctl --endpoints=[127.0.0.1:2379] \ --cacert= --cert= --key= \ - snapshot save backup-file-location + snapshot save ``` where `trusted-ca-file`, `cert-file` and `key-file` can be obtained from the description of the etcd Pod.