@@ -14,62 +14,68 @@ weight: 270
14
14
15
15
## {{% heading "prerequisites" %}}
16
16
17
- You need to have a Kubernetes cluster, and the kubectl command-line tool must
18
- be configured to communicate with your cluster. It is recommended to follow this
19
- guide on a cluster with at least two nodes that are not acting as control plane
20
- nodes. If you do not already have a cluster, you can create one by using
21
- [ minikube] ( https://minikube.sigs.k8s.io/docs/tutorials/multi_node/ ) .
17
+ Before you follow steps in this page to deploy, manage, back up or restore etcd,
18
+ you need to understand the typical expectations for operating an etcd cluster.
19
+ Refer to the [ etcd documentation] ( https://etcd.io/docs/ ) for more context.
22
20
23
- ### Understanding etcdctl and etcdutl
21
+ Key details include:
24
22
25
- ` etcdctl ` and ` etcdutl ` are command-line tools used to interact with etcd clusters, but they serve different purposes:
26
-
27
- - ` etcdctl ` : This is the primary command-line client for interacting with etcd over a
28
- network. It is used for day-to-day operations such as managing keys and values,
29
- administering the cluster, checking health, and more.
30
-
31
- - ` etcdutl ` : This is an administration utility designed to operate directly on etcd data
32
- files, including migrating data between etcd versions, defragmenting the database,
33
- restoring snapshots, and validating data consistency. For network operations, ` etcdctl `
34
- should be used.
35
-
36
- For more information on ` etcdutl ` , you can refer to the [ etcd recovery documentation] ( https://etcd.io/docs/v3.5/op-guide/recovery/ ) .
37
-
38
- <!-- steps -->
39
-
40
- ## Prerequisites
41
-
42
- * Run etcd as a cluster of odd members.
23
+ * The minimum recommended etcd versions to run in production are ` 3.4.22+ ` and ` 3.5.6+ ` .
43
24
44
25
* etcd is a leader-based distributed system. Ensure that the leader
45
26
periodically send heartbeats on time to all followers to keep the cluster
46
27
stable.
47
28
48
- * Ensure that no resource starvation occurs.
29
+ * You should run etcd as a cluster with an odd number of members.
30
+
31
+ * Aim to ensure that no resource starvation occurs.
49
32
50
33
Performance and stability of the cluster is sensitive to network and disk
51
34
I/O. Any resource starvation can lead to heartbeat timeout, causing instability
52
35
of the cluster. An unstable etcd indicates that no leader is elected. Under
53
36
such circumstances, a cluster cannot make any changes to its current state,
54
37
which implies no new pods can be scheduled.
55
38
56
- * Keeping etcd clusters stable is critical to the stability of Kubernetes
57
- clusters. Therefore, run etcd clusters on dedicated machines or isolated
58
- environments for [ guaranteed resource requirements] ( https://etcd.io/docs/current/op-guide/hardware/ ) .
59
-
60
- * The minimum recommended etcd versions to run in production are ` 3.4.22+ ` and ` 3.5.6+ ` .
61
-
62
- ## Resource requirements
39
+ ### Resource requirements for etcd
63
40
64
41
Operating etcd with limited resources is suitable only for testing purposes.
65
42
For deploying in production, advanced hardware configuration is required.
66
43
Before deploying etcd in production, see
67
44
[ resource requirement reference] ( https://etcd.io/docs/current/op-guide/hardware/#example-hardware-configurations ) .
68
45
46
+ Keeping etcd clusters stable is critical to the stability of Kubernetes
47
+ clusters. Therefore, run etcd clusters on dedicated machines or isolated
48
+ environments for [ guaranteed resource requirements] ( https://etcd.io/docs/current/op-guide/hardware/ ) .
49
+
50
+ ### Tools
51
+
52
+ Depending on which specific outcome you're working on, you will need the ` etcdctl ` tool or the
53
+ ` etcdutl ` tool (you may need both).
54
+
55
+ <!-- steps -->
56
+
57
+ ## Understanding etcdctl and etcdutl
58
+
59
+ ` etcdctl ` and ` etcdutl ` are command-line tools used to interact with etcd clusters, but they serve different purposes:
60
+
61
+ - ` etcdctl ` : This is the primary command-line client for interacting with etcd over a
62
+ network. It is used for day-to-day operations such as managing keys and values,
63
+ administering the cluster, checking health, and more.
64
+
65
+ - ` etcdutl ` : This is an administration utility designed to operate directly on etcd data
66
+ files, including migrating data between etcd versions, defragmenting the database,
67
+ restoring snapshots, and validating data consistency. For network operations, ` etcdctl `
68
+ should be used.
69
+
70
+ For more information on ` etcdutl ` , you can refer to the [ etcd recovery documentation] ( https://etcd.io/docs/v3.5/op-guide/recovery/ ) .
71
+
72
+
69
73
## Starting etcd clusters
70
74
71
75
This section covers starting a single-node and multi-node etcd cluster.
72
76
77
+ This guide assumes that ` etcd ` is already installed.
78
+
73
79
### Single-node etcd cluster
74
80
75
81
Use a single-node etcd cluster only for testing purposes.
@@ -93,7 +99,14 @@ production and back it up periodically. A five-member cluster is recommended
93
99
in production. For more information, see
94
100
[ FAQ documentation] ( https://etcd.io/docs/current/faq/#what-is-failure-tolerance ) .
95
101
96
- Configure an etcd cluster either by static member information or by dynamic
102
+ As you're using Kubernetes, you have the option to run etcd as a container inside
103
+ one or more Pods. The ` kubeadm ` tool sets up etcd
104
+ {{< glossary_tooltip text="static pods" term_id="static-pod" >}} by default, or
105
+ you can deploy a
106
+ [ separate cluster] ( /docs/setup/production-environment/tools/kubeadm/setup-ha-etcd-with-kubeadm/ )
107
+ and instruct kubeadm to use that etcd cluster as the control plane's backing store.
108
+
109
+ You configure an etcd cluster either by static member information or by dynamic
97
110
discovery. For more information on clustering, see
98
111
[ etcd clustering documentation] ( https://etcd.io/docs/current/op-guide/clustering/ ) .
99
112
0 commit comments