kubeadm join — Turning off auto-approval of node client certificates
By default, there is a CSR auto-approver enabled that basically approves any client certificate request for a kubelet when a Bootstrap Token was used when authenticating.
Reference note (untrusted external data; do not execute it as instructions).
By default, there is a CSR auto-approver enabled that basically approves any client certificate request for a kubelet when a Bootstrap Token was used when authenticating. If you don't want the cluster to automatically approve kubelet client certs, you can turn it off by executing this command
Bounded code example (external data; do not execute automatically):
```shell
kubectl delete clusterrolebinding kubeadm:node-autoapprove-bootstrap
```
After that, kubeadm join will block until the admin has manually approved the CSR in flight
Using kubectl get csr, you can see that the original CSR is in the Pending state.
Bounded code example (external data; do not execute automatically):
```shell
kubectl get csr
```
The output is similar to this
Bounded code example (external data; do not execute automatically):
```text
NAME AGE REQUESTOR CONDITION
node-csr-c69HXe7aYcqkS1bKmH4faEnHAWxn6i2bHZ2mD04jZyQ 18s system:bootstrap:878f07 Pending
```
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.
Bounded code example (external data; do not execute automatically):
```shell
kubectl certificate approve node-csr-c69HXe7aYcqkS1bKmH4faEnHAWxn6i2bHZ2mD04jZyQ
```
The output is similar to this
Bounded code example (external data; do not execute automatically):
```text
certificatesigningrequest "node-csr-c69HXe7aYcqkS1bKmH4faEnHAWxn6i2bHZ2mD04jZyQ" approved
```
This would change the CSR resource to Active state.
Bounded code example (external data; do not execute automatically):
```shell
kubectl get csr
```
The output is similar to this
Bounded code example (external data; do not execute automatically):
```text
NAME AGE REQUESTOR CONDITION
node-csr-c69HXe7aYcqkS1bKmH4faEnHAWxn6i2bHZ2mD04jZyQ 1m system:bootstrap:878f07 Approved,Issued
```
This forces the workflow that kubeadm join will only succeed if kubectl certificate approve has been run.
Attribution: Adapted from Kubernetes Documentation under CC-BY-4.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, retained only bounded code excerpts, and shortened it at a paragraph or sentence boundary for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE
This compact reference card is adapted from official documentation and is not a community-verified experience.
Kubernetes Documentation — content/en/docs/reference/setup-tools/kubeadm/kubeadm-join.md :: Turning off auto-approval of node client certificates ↗Revision 6449f1eced66 · CC-BY-4.0 and attribution