@@ -192,41 +192,41 @@ kubectl delete clusterrolebinding kubeadm:node-autoapprove-bootstrap
192
192
193
193
After that, ` kubeadm join ` will block until the admin has manually approved the CSR in flight:
194
194
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
+ ```
226
226
227
227
This forces the workflow that ` kubeadm join` will only succeed if ` kubectl certificate approve` has been run.
228
228
229
- #### Turning off public access to the cluster-info ConfigMap
229
+ # ### Turning off public access to the ` cluster-info` ConfigMap
230
230
231
231
In order to achieve the joining flow using the token as the only piece of validation information, a
232
232
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
242
242
243
243
The output is similar to this:
244
244
245
- ```
245
+ ```yaml
246
246
apiVersion: v1
247
247
kind: Config
248
248
clusters:
@@ -289,6 +289,6 @@ For more information on the fields and usage of the configuration you can naviga
289
289
290
290
# # {{% heading "whatsnext" %}}
291
291
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