Skip to content

Commit 0a8988f

Browse files
authored
Merge pull request #43189 from windsonsea/0925e
Clean up 2023-09-25-kubeadm-use-etcd-learner-mode
2 parents 35daed3 + 5a9f5f0 commit 0a8988f

File tree

1 file changed

+24
-20
lines changed

1 file changed

+24
-20
lines changed

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

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ slug: kubeadm-use-etcd-learner-mode
99

1010
The [`kubeadm`](/docs/reference/setup-tools/kubeadm/) tool now supports etcd learner mode, which
1111
allows you to enhance the resilience and stability
12-
of your Kubernetes clusters by leveraging the [learner mode](https://etcd.io/docs/v3.4/learning/design-learner/#appendix-learner-implementation-in-v34)
12+
of your Kubernetes clusters by leveraging the [learner mode](https://etcd.io/docs/v3.4/learning/design-learner/#appendix-learner-implementation-in-v34)
1313
feature introduced in etcd version 3.4.
1414
This guide will walk you through using etcd learner mode with kubeadm. By default, kubeadm runs
1515
a local etcd instance on each control plane node.
@@ -23,19 +23,19 @@ promoted to a voting member only after the etcd data are fully aligned.
2323
etcd learner mode offers several compelling reasons to consider its adoption
2424
in Kubernetes clusters:
2525

26-
1. **Enhanced Resilience**: etcd learner nodes are non-voting members that catch up with
27-
the leader's logs before becoming fully operational. This prevents new cluster members
28-
from disrupting the quorum or causing leader elections, making the cluster more resilient
29-
during membership changes.
30-
2. **Reduced Cluster Unavailability**: Traditional approaches to adding new members often
31-
result in cluster unavailability periods, especially in slow infrastructure or misconfigurations.
32-
etcd learner mode minimizes such disruptions.
33-
3. **Simplified Maintenance**: Learner nodes provide a safer and reversible way to add or replace
34-
cluster members. This reduces the risk of accidental cluster outages due to misconfigurations or
35-
missteps during member additions.
36-
4. **Improved Network Tolerance**: In scenarios involving network partitions, learner mode allows
37-
for more graceful handling. Depending on the partition a new member lands, it can seamlessly
38-
integrate with the existing cluster without causing disruptions.
26+
1. **Enhanced Resilience**: etcd learner nodes are non-voting members that catch up with
27+
the leader's logs before becoming fully operational. This prevents new cluster members
28+
from disrupting the quorum or causing leader elections, making the cluster more resilient
29+
during membership changes.
30+
1. **Reduced Cluster Unavailability**: Traditional approaches to adding new members often
31+
result in cluster unavailability periods, especially in slow infrastructure or misconfigurations.
32+
etcd learner mode minimizes such disruptions.
33+
1. **Simplified Maintenance**: Learner nodes provide a safer and reversible way to add or replace
34+
cluster members. This reduces the risk of accidental cluster outages due to misconfigurations or
35+
missteps during member additions.
36+
1. **Improved Network Tolerance**: In scenarios involving network partitions, learner mode allows
37+
for more graceful handling. Depending on the partition a new member lands, it can seamlessly
38+
integrate with the existing cluster without causing disruptions.
3939

4040
In summary, the etcd learner mode improves the reliability and manageability of Kubernetes clusters
4141
during member additions and changes, making it a valuable feature for cluster operators.
@@ -80,28 +80,32 @@ ETCDCTL_API=3 etcdctl --endpoints 127.0.0.1:2379 \
8080
--cert=/etc/kubernetes/pki/etcd/server.crt \
8181
--key=/etc/kubernetes/pki/etcd/server.key \
8282
--cacert=/etc/kubernetes/pki/etcd/ca.crt \
83-
member list
83+
member list
8484
...
8585
dc543c4d307fadb9, started, node1, https://10.6.177.40:2380, https://10.6.177.40:2379, false
8686
```
8787

8888
To check if the Kubernetes control plane is healthy, run `kubectl get node -l node-role.kubernetes.io/control-plane=`
8989
and check if the nodes are ready.
9090

91-
Note: It is recommended to have an odd number of members in a etcd cluster.
91+
{{< note >}}
92+
It is recommended to have an odd number of members in an etcd cluster.
93+
{{< /note >}}
9294

9395
Before joining a worker node to the new Kubernetes cluster, ensure that the control plane nodes are healthy.
9496

9597
## What's next
9698

9799
- The feature gate `EtcdLearnerMode` is alpha in v1.27 and we expect it to graduate to beta in the next
98-
minor release of Kubernetes (v1.29).
99-
- etcd has an open issue that may make the process more automatic:
100+
minor release of Kubernetes (v1.29).
101+
- etcd has an open issue that may make the process more automatic:
100102
[Support auto-promoting a learner member to a voting member](https://github.com/etcd-io/etcd/issues/15107).
101-
- Learn more about the kubeadm [configuration format](/docs/reference/config-api/kubeadm-config.v1beta3/) here.
103+
- Learn more about the kubeadm [configuration format](/docs/reference/config-api/kubeadm-config.v1beta3/).
102104

103105
## Feedback
104106

105107
Was this guide helpful? If you have any feedback or encounter any issues, please let us know.
106108
Your feedback is always welcome! Join the bi-weekly [SIG Cluster Lifecycle meeting](https://docs.google.com/document/d/1Gmc7LyCIL_148a9Tft7pdhdee0NBHdOfHS1SAF0duI4/edit)
107-
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).
109+
or weekly [kubeadm office hours](https://docs.google.com/document/d/130_kiXjG7graFNSnIAgtMS1G8zPDwpkshgfRYS0nggo/edit).
110+
Or reach us via [Slack](https://slack.k8s.io/) (channel **#kubeadm**), or the
111+
[SIG's mailing list](https://groups.google.com/g/kubernetes-sig-cluster-lifecycle).

0 commit comments

Comments
 (0)