Skip to content

Commit 8737933

Browse files
authored
Merge pull request #44212 from windsonsea/etcdyh
[zh] Sync 2023-09-25-kubeadm-use-etcd-learner-mode.md
2 parents 5f77eb1 + 11f3b10 commit 8737933

File tree

1 file changed

+33
-27
lines changed

1 file changed

+33
-27
lines changed

content/zh-cn/blog/_posts/2023-09-25-kubeadm-use-etcd-learner-mode.md

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ slug: kubeadm-use-etcd-learner-mode
2121
<!--
2222
The [`kubeadm`](/docs/reference/setup-tools/kubeadm/) tool now supports etcd learner mode, which
2323
allows you to enhance the resilience and stability
24-
of your Kubernetes clusters by leveraging the [learner mode](https://etcd.io/docs/v3.4/learning/design-learner/#appendix-learner-implementation-in-v34)
24+
of your Kubernetes clusters by leveraging the [learner mode](https://etcd.io/docs/v3.4/learning/design-learner/#appendix-learner-implementation-in-v34)
2525
feature introduced in etcd version 3.4.
2626
This guide will walk you through using etcd learner mode with kubeadm. By default, kubeadm runs
2727
a local etcd instance on each control plane node.
@@ -52,27 +52,27 @@ in Kubernetes clusters:
5252
在 Kubernetes 集群中采用 etcd learner 模式具有以下几个优点:
5353

5454
<!--
55-
1. **Enhanced Resilience**: etcd learner nodes are non-voting members that catch up with
56-
the leader's logs before becoming fully operational. This prevents new cluster members
57-
from disrupting the quorum or causing leader elections, making the cluster more resilient
58-
during membership changes.
59-
2. **Reduced Cluster Unavailability**: Traditional approaches to adding new members often
60-
result in cluster unavailability periods, especially in slow infrastructure or misconfigurations.
61-
etcd learner mode minimizes such disruptions.
62-
3. **Simplified Maintenance**: Learner nodes provide a safer and reversible way to add or replace
63-
cluster members. This reduces the risk of accidental cluster outages due to misconfigurations or
64-
missteps during member additions.
65-
4. **Improved Network Tolerance**: In scenarios involving network partitions, learner mode allows
66-
for more graceful handling. Depending on the partition a new member lands, it can seamlessly
67-
integrate with the existing cluster without causing disruptions.
55+
1. **Enhanced Resilience**: etcd learner nodes are non-voting members that catch up with
56+
the leader's logs before becoming fully operational. This prevents new cluster members
57+
from disrupting the quorum or causing leader elections, making the cluster more resilient
58+
during membership changes.
59+
1. **Reduced Cluster Unavailability**: Traditional approaches to adding new members often
60+
result in cluster unavailability periods, especially in slow infrastructure or misconfigurations.
61+
etcd learner mode minimizes such disruptions.
62+
1. **Simplified Maintenance**: Learner nodes provide a safer and reversible way to add or replace
63+
cluster members. This reduces the risk of accidental cluster outages due to misconfigurations or
64+
missteps during member additions.
65+
1. **Improved Network Tolerance**: In scenarios involving network partitions, learner mode allows
66+
for more graceful handling. Depending on the partition a new member lands, it can seamlessly
67+
integrate with the existing cluster without causing disruptions.
6868
-->
6969
1. **增强了弹性**:etcd learner 节点是非投票成员,在完全进入角色之前会追随领导者的日志。
7070
这样可以防止新的集群成员干扰投票结果或引起领导者选举,从而使集群在成员变更期间更具弹性。
71-
2. **减少了集群不可用时间**:传统的添加新成员的方法通常会造成一段时间集群不可用,特别是在基础设施迟缓或误配的情况下更为明显。
71+
1. **减少了集群不可用时间**:传统的添加新成员的方法通常会造成一段时间集群不可用,特别是在基础设施迟缓或误配的情况下更为明显。
7272
而 etcd learner 模式可以最大程度地减少此类干扰。
73-
3. **简化了维护**:learner 节点提供了一种更安全、可逆的方式来添加或替换集群成员。
73+
1. **简化了维护**:learner 节点提供了一种更安全、可逆的方式来添加或替换集群成员。
7474
这降低了由于误配或在成员添加过程中出错而导致集群意外失效的风险。
75-
4. **改进了网络容错性**:在涉及网络分区的场景中,learner 模式允许更优雅的处理。
75+
1. **改进了网络容错性**:在涉及网络分区的场景中,learner 模式允许更优雅的处理。
7676
根据新成员所落入的分区,它可以无缝地与现有集群集成,而不会造成中断。
7777

7878
<!--
@@ -149,34 +149,38 @@ ETCDCTL_API=3 etcdctl --endpoints 127.0.0.1:2379 \
149149
--cert=/etc/kubernetes/pki/etcd/server.crt \
150150
--key=/etc/kubernetes/pki/etcd/server.key \
151151
--cacert=/etc/kubernetes/pki/etcd/ca.crt \
152-
member list
152+
member list
153153
...
154154
dc543c4d307fadb9, started, node1, https://10.6.177.40:2380, https://10.6.177.40:2379, false
155155
```
156156

157157
<!--
158158
To check if the Kubernetes control plane is healthy, run `kubectl get node -l node-role.kubernetes.io/control-plane=`
159159
and check if the nodes are ready.
160-
161-
Note: It is recommended to have an odd number of members in a etcd cluster.
162-
163-
Before joining a worker node to the new Kubernetes cluster, ensure that the control plane nodes are healthy.
164160
-->
165161
要检查 Kubernetes 控制平面是否健康,运行 `kubectl get node -l node-role.kubernetes.io/control-plane=`
166162
并检查节点是否就绪。
167163

168-
注意:建议在 etcd 集群中的成员个数为奇数。
164+
{{< note >}}
165+
<!--
166+
It is recommended to have an odd number of members in an etcd cluster.
167+
-->
168+
建议在 etcd 集群中的成员个数为奇数。
169+
{{< /note >}}
169170

171+
<!--
172+
Before joining a worker node to the new Kubernetes cluster, ensure that the control plane nodes are healthy.
173+
-->
170174
在将工作节点接入新的 Kubernetes 集群之前,确保控制平面节点健康。
171175

172176
<!--
173177
## What's next
174178

175179
- The feature gate `EtcdLearnerMode` is alpha in v1.27 and we expect it to graduate to beta in the next
176-
minor release of Kubernetes (v1.29).
177-
- etcd has an open issue that may make the process more automatic:
180+
minor release of Kubernetes (v1.29).
181+
- etcd has an open issue that may make the process more automatic:
178182
[Support auto-promoting a learner member to a voting member](https://github.com/etcd-io/etcd/issues/15107).
179-
- Learn more about the kubeadm [configuration format](/docs/reference/config-api/kubeadm-config.v1beta3/) here.
183+
- Learn more about the kubeadm [configuration format](/docs/reference/config-api/kubeadm-config.v1beta3/).
180184
-->
181185
## 接下来的步骤 {#whats-next}
182186

@@ -190,7 +194,9 @@ Before joining a worker node to the new Kubernetes cluster, ensure that the cont
190194

191195
Was this guide helpful? If you have any feedback or encounter any issues, please let us know.
192196
Your feedback is always welcome! Join the bi-weekly [SIG Cluster Lifecycle meeting](https://docs.google.com/document/d/1Gmc7LyCIL_148a9Tft7pdhdee0NBHdOfHS1SAF0duI4/edit)
193-
or weekly [kubeadm office hours](https://docs.google.com/document/d/130_kiXjG7graFNSnIAgtMS1G8zPDwpkshgfRYS0nggo/edit). Or reach us via [Slack](https://slack.k8s.io/) (channel **#kubeadm**), or the [SIG's mailing list](https://groups.google.com/g/kubernetes-sig-cluster-lifecycle).
197+
or weekly [kubeadm office hours](https://docs.google.com/document/d/130_kiXjG7graFNSnIAgtMS1G8zPDwpkshgfRYS0nggo/edit).
198+
Or reach us via [Slack](https://slack.k8s.io/) (channel **#kubeadm**), or the
199+
[SIG's mailing list](https://groups.google.com/g/kubernetes-sig-cluster-lifecycle).
194200
-->
195201
## 反馈 {#feedback}
196202

0 commit comments

Comments
 (0)