Skip to content

Commit 4f2a2eb

Browse files
authored
Merge pull request #35706 from ydFu/update-kubeadm-join
Update kubeadm-join.md
2 parents e8b9538 + e97ab16 commit 4f2a2eb

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

content/en/docs/reference/setup-tools/kubeadm/kubeadm-join.md

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -192,41 +192,41 @@ kubectl delete clusterrolebinding kubeadm:node-autoapprove-bootstrap
192192

193193
After that, `kubeadm join` will block until the admin has manually approved the CSR in flight:
194194

195-
```shell
196-
kubectl get csr
197-
```
198-
199-
The output is similar to this:
200-
201-
```
202-
NAME AGE REQUESTOR CONDITION
203-
node-csr-c69HXe7aYcqkS1bKmH4faEnHAWxn6i2bHZ2mD04jZyQ 18s system:bootstrap:878f07 Pending
204-
```
205-
206-
```shell
207-
kubectl certificate approve node-csr-c69HXe7aYcqkS1bKmH4faEnHAWxn6i2bHZ2mD04jZyQ
208-
```
209-
210-
The output is similar to this:
211-
212-
```
213-
certificatesigningrequest "node-csr-c69HXe7aYcqkS1bKmH4faEnHAWxn6i2bHZ2mD04jZyQ" approved
214-
```
215-
216-
```shell
217-
kubectl get csr
218-
```
219-
220-
The output is similar to this:
221-
222-
```
223-
NAME AGE REQUESTOR CONDITION
224-
node-csr-c69HXe7aYcqkS1bKmH4faEnHAWxn6i2bHZ2mD04jZyQ 1m system:bootstrap:878f07 Approved,Issued
225-
```
195+
1. Using `kubectl get csr`, you can see that the original CSR is in the Pending state.
196+
```shell
197+
kubectl get csr
198+
```
199+
200+
The output is similar to this:
201+
```
202+
NAME AGE REQUESTOR CONDITION
203+
node-csr-c69HXe7aYcqkS1bKmH4faEnHAWxn6i2bHZ2mD04jZyQ 18s system:bootstrap:878f07 Pending
204+
```
205+
206+
2. `kubectl certificate approve` allows the admin to approve CSR. This action tells a certificate signing controller to issue a certificate to the requestor with the attributes requested in the CSR.
207+
```shell
208+
kubectl certificate approve node-csr-c69HXe7aYcqkS1bKmH4faEnHAWxn6i2bHZ2mD04jZyQ
209+
```
210+
211+
The output is similar to this:
212+
```
213+
certificatesigningrequest "node-csr-c69HXe7aYcqkS1bKmH4faEnHAWxn6i2bHZ2mD04jZyQ" approved
214+
```
215+
216+
3. This would change the CRS resource to Active state.
217+
```shell
218+
kubectl get csr
219+
```
220+
221+
The output is similar to this:
222+
```
223+
NAME AGE REQUESTOR CONDITION
224+
node-csr-c69HXe7aYcqkS1bKmH4faEnHAWxn6i2bHZ2mD04jZyQ 1m system:bootstrap:878f07 Approved,Issued
225+
```
226226

227227
This forces the workflow that `kubeadm join` will only succeed if `kubectl certificate approve` has been run.
228228

229-
#### Turning off public access to the cluster-info ConfigMap
229+
#### Turning off public access to the `cluster-info` ConfigMap
230230

231231
In order to achieve the joining flow using the token as the only piece of validation information, a
232232
ConfigMap with some data needed for validation of the control-plane node's identity is exposed publicly by
@@ -242,7 +242,7 @@ kubectl -n kube-public get cm cluster-info -o yaml | grep "kubeconfig:" -A11 | g
242242
243243
The output is similar to this:
244244
245-
```
245+
```yaml
246246
apiVersion: v1
247247
kind: Config
248248
clusters:
@@ -289,6 +289,6 @@ For more information on the fields and usage of the configuration you can naviga
289289

290290
## {{% heading "whatsnext" %}}
291291

292-
* [kubeadm init](/docs/reference/setup-tools/kubeadm/kubeadm-init/) to bootstrap a Kubernetes control-plane node
293-
* [kubeadm token](/docs/reference/setup-tools/kubeadm/kubeadm-token/) to manage tokens for `kubeadm join`
294-
* [kubeadm reset](/docs/reference/setup-tools/kubeadm/kubeadm-reset/) to revert any changes made to this host by `kubeadm init` or `kubeadm join`
292+
* [kubeadm init](/docs/reference/setup-tools/kubeadm/kubeadm-init/) to bootstrap a Kubernetes control-plane node.
293+
* [kubeadm token](/docs/reference/setup-tools/kubeadm/kubeadm-token/) to manage tokens for `kubeadm join`.
294+
* [kubeadm reset](/docs/reference/setup-tools/kubeadm/kubeadm-reset/) to revert any changes made to this host by `kubeadm init` or `kubeadm join`.

0 commit comments

Comments
 (0)