Skip to content

Commit 356088e

Browse files
authored
Merge pull request #33973 from kinzhi/kinzhi128
[zh]Update content/zh/docs/tasks/administer-cluster/configure-upgrade-etcd.md
2 parents 641dd45 + 57bb2d6 commit 356088e

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

content/zh/docs/tasks/administer-cluster/configure-upgrade-etcd.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ content_type: task
2222

2323
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
2424

25-
26-
2725
<!-- steps -->
2826

2927
<!--
@@ -77,7 +75,7 @@ Before deploying etcd in production, see
7775
7876
## Starting etcd clusters
7977
80-
This section covers starting a single-node and multi-node etcd cluster.
78+
This section covers starting a single-node and multi-node etcd cluster.
8179
-->
8280
## 资源要求
8381

@@ -104,7 +102,7 @@ Use a single-node etcd cluster only for testing purpose.
104102
2. Start the Kubernetes API server with the flag
105103
`--etcd-servers=$PRIVATE_IP:2379`.
106104
107-
Make sure `PRIVATE_IP` is set to your etcd client IP.
105+
Make sure `PRIVATE_IP` is set to your etcd client IP.
108106
-->
109107
### 单节点 etcd 集群
110108

@@ -236,8 +234,8 @@ communication:
236234
237235
```
238236
ETCDCTL_API=3 etcdctl --endpoints 10.2.0.9:2379 \
239-
--cert=/etc/kubernetes/pki/etcd/client.crt \
240-
--key=/etc/kubernetes/pki/etcd/client.key \
237+
--cert=/etc/kubernetes/pki/etcd/server.crt \
238+
--key=/etc/kubernetes/pki/etcd/server.key \
241239
--cacert=/etc/kubernetes/pki/etcd/ca.crt \
242240
member list
243241
```
@@ -253,8 +251,8 @@ ETCDCTL_API=3 etcdctl --endpoints 10.2.0.9:2379 \
253251

254252
```
255253
ETCDCTL_API=3 etcdctl --endpoints 10.2.0.9:2379 \
256-
--cert=/etc/kubernetes/pki/etcd/client.crt \
257-
--key=/etc/kubernetes/pki/etcd/client.key \
254+
--cert=/etc/kubernetes/pki/etcd/server.crt \
255+
--key=/etc/kubernetes/pki/etcd/server.key \
258256
--cacert=/etc/kubernetes/pki/etcd/ca.crt \
259257
member list
260258
```
@@ -274,7 +272,7 @@ access to clients with the certificate `k8sclient.cert`.
274272
275273
Once etcd is configured correctly, only clients with valid certificates can
276274
access it. To give Kubernetes API servers the access, configure them with the
277-
flags `--etcd-certfile=k8sclient.cert`,`--etcd-keyfile=k8sclient.key` and
275+
flags `--etcd-certfile=k8sclient.cert`, `--etcd-keyfile=k8sclient.key` and
278276
`--etcd-cafile=ca.cert`.
279277
280278
{{< note >}}
@@ -292,7 +290,7 @@ information, see the related issue
292290
指定参数 `--client-cert-auth=true``--trusted-ca-file=etcd.ca` 将限制对具有证书 `k8sclient.cert` 的客户端的访问。
293291

294292
一旦正确配置了 etcd,只有具有有效证书的客户端才能访问它。要让 Kubernetes API 服务器访问,
295-
可以使用参数 `--etcd-certfile=k8sclient.cert`,`--etcd-keyfile=k8sclient.key``--etcd-cafile=ca.cert` 配置。
293+
可以使用参数 `--etcd-certfile=k8sclient.cert`, `--etcd-keyfile=k8sclient.key``--etcd-cafile=ca.cert` 配置。
296294

297295
{{< note >}}
298296
Kubernetes 目前不支持 etcd 身份验证。
@@ -593,12 +591,16 @@ employed to recover the data of a failed cluster.
593591
594592
Before starting the restore operation, a snapshot file must be present. It can
595593
either be a snapshot file from a previous backup operation, or from a remaining
596-
[data directory]( https://etcd.io/docs/current/op-guide/configuration/#--data-dir).
594+
[data directory](https://etcd.io/docs/current/op-guide/configuration/#--data-dir).
597595
Here is an example:
598596
599597
```shell
600598
ETCDCTL_API=3 etcdctl --endpoints 10.2.0.9:2379 snapshot restore snapshotdb
601599
```
600+
Another example for restoring using etcdctl options:
601+
```shell
602+
ETCDCTL_API=3 etcdctl --data-dir <data-dir-location> snapshot restore snapshotdb
603+
```
602604
603605
For more information and examples on restoring a cluster from a snapshot file, see
604606
[etcd disaster recovery documentation](https://etcd.io/docs/current/op-guide/recovery/#restoring-a-cluster).
@@ -638,15 +640,14 @@ etcd 支持从 [major.minor](http://semver.org/) 或其他不同 patch 版本的
638640
还原操作用于恢复失败的集群的数据。
639641

640642
在启动还原操作之前,必须有一个快照文件。它可以是来自以前备份操作的快照文件,
641-
也可以是来自剩余[数据目录]( https://etcd.io/docs/current/op-guide/configuration/#--data-dir)的快照文件。
643+
也可以是来自剩余[数据目录](https://etcd.io/docs/current/op-guide/configuration/#--data-dir)的快照文件。
642644
例如:
643645

644646
```shell
645647
ETCDCTL_API=3 etcdctl --endpoints 10.2.0.9:2379 snapshot restore snapshotdb
646648
```
647649

648650
恢复时也可以指定操作选项,例如:
649-
650651
```
651652
ETCDCTL_API=3 etcdctl --data-dir <data-dir-location> snapshot restore snapshotdb
652653
```
@@ -674,9 +675,9 @@ ETCDCTL_API=3 etcdctl --data-dir <data-dir-location> snapshot restore snapshotdb
674675
{{< /note >}}
675676

676677
<!--
677-
678678
## Upgrading etcd clusters
679679
680+
680681
For more details on etcd upgrade, please refer to the [etcd upgrades](https://etcd.io/docs/latest/upgrades/) documentation.
681682
682683
{{< note >}}

0 commit comments

Comments
 (0)