Skip to content

Commit 40ce582

Browse files
authored
Merge pull request #21722 from tengqm/fix-kubeadm-ha
Fix the numbered list in kubeadm HA page
2 parents 076ef0c + 4f1f92d commit 40ce582

File tree

1 file changed

+28
-26
lines changed

1 file changed

+28
-26
lines changed

content/en/docs/setup/production-environment/tools/kubeadm/high-availability.md

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -108,19 +108,20 @@ option. Your cluster requirements may need a different configuration.
108108
sudo kubeadm init --control-plane-endpoint "LOAD_BALANCER_DNS:LOAD_BALANCER_PORT" --upload-certs
109109
```
110110

111-
112111
- You can use the `--kubernetes-version` flag to set the Kubernetes version to use.
113-
It is recommended that the versions of kubeadm, kubelet, kubectl and Kubernetes match.
112+
It is recommended that the versions of kubeadm, kubelet, kubectl and Kubernetes match.
114113
- The `--control-plane-endpoint` flag should be set to the address or DNS and port of the load balancer.
115114

116115
- The `--upload-certs` flag is used to upload the certificates that should be shared
117-
across all the control-plane instances to the cluster. If instead, you prefer to copy certs across
118-
control-plane nodes manually or using automation tools, please remove this flag and refer to [Manual
119-
certificate distribution](#manual-certs) section below.
116+
across all the control-plane instances to the cluster. If instead, you prefer to copy certs across
117+
control-plane nodes manually or using automation tools, please remove this flag and refer to [Manual
118+
certificate distribution](#manual-certs) section below.
120119

121120
{{< note >}}
122121
The `kubeadm init` flags `--config` and `--certificate-key` cannot be mixed, therefore if you want
123-
to use the [kubeadm configuration](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2) you must add the `certificateKey` field in the appropriate config locations (under `InitConfiguration` and `JoinConfiguration: controlPlane`).
122+
to use the [kubeadm configuration](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2)
123+
you must add the `certificateKey` field in the appropriate config locations
124+
(under `InitConfiguration` and `JoinConfiguration: controlPlane`).
124125
{{< /note >}}
125126

126127
{{< note >}}
@@ -132,34 +133,34 @@ option. Your cluster requirements may need a different configuration.
132133

133134
- The output looks similar to:
134135

135-
```sh
136-
...
137-
You can now join any number of control-plane node by running the following command on each as a root:
138-
kubeadm join 192.168.0.200:6443 --token 9vr73a.a8uxyaju799qwdjv --discovery-token-ca-cert-hash sha256:7c2e69131a36ae2a042a339b33381c6d0d43887e2de83720eff5359e26aec866 --control-plane --certificate-key f8902e114ef118304e561c3ecd4d0b543adc226b7a07f675f56564185ffe0c07
139-
140-
Please note that the certificate-key gives access to cluster sensitive data, keep it secret!
141-
As a safeguard, uploaded-certs will be deleted in two hours; If necessary, you can use kubeadm init phase upload-certs to reload certs afterward.
142-
143-
Then you can join any number of worker nodes by running the following on each as root:
144-
kubeadm join 192.168.0.200:6443 --token 9vr73a.a8uxyaju799qwdjv --discovery-token-ca-cert-hash sha256:7c2e69131a36ae2a042a339b33381c6d0d43887e2de83720eff5359e26aec866
145-
```
136+
```sh
137+
...
138+
You can now join any number of control-plane node by running the following command on each as a root:
139+
kubeadm join 192.168.0.200:6443 --token 9vr73a.a8uxyaju799qwdjv --discovery-token-ca-cert-hash sha256:7c2e69131a36ae2a042a339b33381c6d0d43887e2de83720eff5359e26aec866 --control-plane --certificate-key f8902e114ef118304e561c3ecd4d0b543adc226b7a07f675f56564185ffe0c07
140+
141+
Please note that the certificate-key gives access to cluster sensitive data, keep it secret!
142+
As a safeguard, uploaded-certs will be deleted in two hours; If necessary, you can use kubeadm init phase upload-certs to reload certs afterward.
143+
144+
Then you can join any number of worker nodes by running the following on each as root:
145+
kubeadm join 192.168.0.200:6443 --token 9vr73a.a8uxyaju799qwdjv --discovery-token-ca-cert-hash sha256:7c2e69131a36ae2a042a339b33381c6d0d43887e2de83720eff5359e26aec866
146+
```
146147

147148
- Copy this output to a text file. You will need it later to join control plane and worker nodes to the cluster.
148149
- When `--upload-certs` is used with `kubeadm init`, the certificates of the primary control plane
149-
are encrypted and uploaded in the `kubeadm-certs` Secret.
150+
are encrypted and uploaded in the `kubeadm-certs` Secret.
150151
- To re-upload the certificates and generate a new decryption key, use the following command on a control plane
151152
node that is already joined to the cluster:
152153

153-
```sh
154-
sudo kubeadm init phase upload-certs --upload-certs
155-
```
154+
```sh
155+
sudo kubeadm init phase upload-certs --upload-certs
156+
```
156157

157158
- You can also specify a custom `--certificate-key` during `init` that can later be used by `join`.
158159
To generate such a key you can use the following command:
159160

160-
```sh
161-
kubeadm alpha certs certificate-key
162-
```
161+
```sh
162+
kubeadm alpha certs certificate-key
163+
```
163164

164165
{{< note >}}
165166
The `kubeadm-certs` Secret and decryption key expire after two hours.
@@ -170,7 +171,8 @@ Then you can join any number of worker nodes by running the following on each as
170171
{{< /caution >}}
171172

172173
1. Apply the CNI plugin of your choice:
173-
[Follow these instructions](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#pod-network) to install the CNI provider. Make sure the configuration corresponds to the Pod CIDR specified in the kubeadm configuration file if applicable.
174+
[Follow these instructions](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#pod-network)
175+
to install the CNI provider. Make sure the configuration corresponds to the Pod CIDR specified in the kubeadm configuration file if applicable.
174176

175177
In this example we are using Weave Net:
176178

@@ -203,7 +205,7 @@ For each additional control plane node you should:
203205

204206
- The `--control-plane` flag tells `kubeadm join` to create a new control plane.
205207
- The `--certificate-key ...` will cause the control plane certificates to be downloaded
206-
from the `kubeadm-certs` Secret in the cluster and be decrypted using the given key.
208+
from the `kubeadm-certs` Secret in the cluster and be decrypted using the given key.
207209

208210
## External etcd nodes
209211

0 commit comments

Comments
 (0)