Skip to content

Commit 06e57d3

Browse files
authored
Merge pull request #21659 from surajssd/remove-TLS-bootstrapping-limits
TLS bootstrapping: Remove "Limits" section
2 parents aa19341 + 59f5e70 commit 06e57d3

File tree

1 file changed

+13
-25
lines changed

1 file changed

+13
-25
lines changed

content/en/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping.md

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ In a Kubernetes cluster, the components on the worker nodes - kubelet and kube-p
1414
In order to ensure that communication is kept private, not interfered with, and ensure that each component of the cluster is talking to another trusted component, we strongly
1515
recommend using client TLS certificates on nodes.
1616

17-
The normal process of bootstrapping these components, especially worker nodes that need certificates so they can communicate safely with kube-apiserver,
18-
can be a challenging process as it is often outside of the scope of Kubernetes and requires significant additional work.
17+
The normal process of bootstrapping these components, especially worker nodes that need certificates so they can communicate safely with kube-apiserver,
18+
can be a challenging process as it is often outside of the scope of Kubernetes and requires significant additional work.
1919
This in turn, can make it challenging to initialize or scale a cluster.
2020

2121
In order to simplify the process, beginning in version 1.4, Kubernetes introduced a certificate request and signing API to simplify the process. The proposal can be
2222
found [here](https://github.com/kubernetes/kubernetes/pull/20439).
2323

2424
This document describes the process of node initialization, how to set up TLS client certificate bootstrapping for
25-
kubelets, and how it works.
25+
kubelets, and how it works.
2626

2727

2828

@@ -90,15 +90,15 @@ In addition, you need your Kubernetes Certificate Authority (CA).
9090
As without bootstrapping, you will need a Certificate Authority (CA) key and certificate. As without bootstrapping, these will be used
9191
to sign the kubelet certificate. As before, it is your responsibility to distribute them to master nodes.
9292

93-
For the purposes of this document, we will assume these have been distributed to master nodes at `/var/lib/kubernetes/ca.pem` (certificate) and `/var/lib/kubernetes/ca-key.pem` (key).
93+
For the purposes of this document, we will assume these have been distributed to master nodes at `/var/lib/kubernetes/ca.pem` (certificate) and `/var/lib/kubernetes/ca-key.pem` (key).
9494
We will refer to these as "Kubernetes CA certificate and key".
9595

9696
All Kubernetes components that use these certificates - kubelet, kube-apiserver, kube-controller-manager - assume the key and certificate to be PEM-encoded.
9797

9898
## kube-apiserver configuration
9999
The kube-apiserver has several requirements to enable TLS bootstrapping:
100100

101-
* Recognizing CA that signs the client certificate
101+
* Recognizing CA that signs the client certificate
102102
* Authenticating the bootstrapping kubelet to the `system:bootstrappers` group
103103
* Authorize the bootstrapping kubelet to create a certificate signing request (CSR)
104104

@@ -120,13 +120,13 @@ of provisioning.
120120
1. [Bootstrap Tokens](#bootstrap-tokens)
121121
2. [Token authentication file](#token-authentication-file)
122122

123-
Bootstrap tokens are a simpler and more easily managed method to authenticate kubelets, and do not require any additional flags when starting kube-apiserver.
123+
Bootstrap tokens are a simpler and more easily managed method to authenticate kubelets, and do not require any additional flags when starting kube-apiserver.
124124
Using bootstrap tokens is currently __beta__ as of Kubernetes version 1.12.
125125

126126
Whichever method you choose, the requirement is that the kubelet be able to authenticate as a user with the rights to:
127127

128128
1. create and retrieve CSRs
129-
2. be automatically approved to request node client certificates, if automatic approval is enabled.
129+
2. be automatically approved to request node client certificates, if automatic approval is enabled.
130130

131131
A kubelet authenticating using bootstrap tokens is authenticated as a user in the group `system:bootstrappers`, which is the standard method to use.
132132

@@ -152,7 +152,7 @@ From the kube-apiserver's perspective, however, the bootstrap token is special.
152152
and grants anyone authenticating with that token special bootstrap rights, notably treating them as a member of the `system:bootstrappers` group. This fulfills a basic requirement
153153
for TLS bootstrapping.
154154

155-
The details for creating the secret are available [here](/docs/reference/access-authn-authz/bootstrap-tokens/).
155+
The details for creating the secret are available [here](/docs/reference/access-authn-authz/bootstrap-tokens/).
156156

157157
If you want to use bootstrap tokens, you must enable it on kube-apiserver with the flag:
158158

@@ -161,7 +161,7 @@ If you want to use bootstrap tokens, you must enable it on kube-apiserver with t
161161
```
162162

163163
#### Token authentication file
164-
kube-apiserver has an ability to accept tokens as authentication.
164+
kube-apiserver has an ability to accept tokens as authentication.
165165
These tokens are arbitrary but should represent at least 128 bits of entropy derived
166166
from a secure random number generator (such as `/dev/urandom` on most modern Linux
167167
systems). There are multiple ways you can generate a token. For example:
@@ -252,8 +252,8 @@ RBAC permissions to the correct group.
252252

253253
There are two distinct sets of permissions:
254254

255-
* `nodeclient`: If a node is creating a new certificate for a node, then it does not have a certificate yet. It is authenticating using one of the tokens listed above, and thus is part of the group `system:bootstrappers`.
256-
* `selfnodeclient`: If a node is renewing its certificate, then it already has a certificate (by definition), which it uses continuously to authenticate as part of the group `system:nodes`.
255+
* `nodeclient`: If a node is creating a new certificate for a node, then it does not have a certificate yet. It is authenticating using one of the tokens listed above, and thus is part of the group `system:bootstrappers`.
256+
* `selfnodeclient`: If a node is renewing its certificate, then it already has a certificate (by definition), which it uses continuously to authenticate as part of the group `system:nodes`.
257257

258258
To enable the kubelet to request and receive a new certificate, create a `ClusterRoleBinding` that binds the group in which the bootstrapping node is a member `system:bootstrappers` to the `ClusterRole` that grants it permission, `system:certificates.k8s.io:certificatesigningrequests:nodeclient`:
259259

@@ -273,7 +273,7 @@ roleRef:
273273
apiGroup: rbac.authorization.k8s.io
274274
```
275275
276-
To enable the kubelet to renew its own client certificate, create a `ClusterRoleBinding` that binds the group in which the fully functioning node is a member `system:nodes` to the `ClusterRole` that
276+
To enable the kubelet to renew its own client certificate, create a `ClusterRoleBinding` that binds the group in which the fully functioning node is a member `system:nodes` to the `ClusterRole` that
277277
grants it permission, `system:certificates.k8s.io:certificatesigningrequests:selfnodeclient`:
278278

279279
```yml
@@ -382,7 +382,7 @@ To secure these, the kubelet can do one of:
382382
* request serving certificates from the cluster server, via the CSR API
383383

384384
The client certificate provided by TLS bootstrapping is signed, by default, for `client auth` only, and thus cannot
385-
be used as serving certificates, or `server auth`.
385+
be used as serving certificates, or `server auth`.
386386

387387
However, you _can_ enable its server certificate, at least partially, via certificate rotation.
388388

@@ -443,15 +443,3 @@ also manually approve certificate requests using kubectl. An administrator can
443443
list CSRs with `kubectl get csr` and describe one in detail with `kubectl
444444
describe csr <name>`. An administrator can approve or deny a CSR with `kubectl
445445
certificate approve <name>` and `kubectl certificate deny <name>`.
446-
447-
448-
## Limits
449-
Although Kubernetes supports running control plane master components like kube-apiserver and kube-controller-manager in containers, and even as `Pod`s in a kubelet, as of this writing, you cannot both TLS Bootstrap a kubelet and run master plane components on it.
450-
451-
The reason for this limitation is that the kubelet attempts to bootstrap communication with kube-apiserver _before_ starting any pods, even static ones define on disk and referenced via the kubelet option `--pod-manifest-path=<PATH>`. Trying to do both TLS Bootstrapping and master components in kubelet leads to a race condition: kubelet needs to communicate to kube-apiserver to request certificates, yet requires those certificates to be available to start kube-apiserver.
452-
453-
An issue is open referencing this [here](https://github.com/kubernetes/kubernetes/issues/68686).
454-
455-
456-
457-

0 commit comments

Comments
 (0)