You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -219,9 +220,10 @@ List the specific goals of the KEP. What is it trying to achieve? How will we
219
220
know that this has succeeded?
220
221
-->
221
222
222
-
- Add a new code path in kubeadm that can be used to join control plane nodes
223
+
- Add a new code path in kubeadm that can be used to join control plane nodes
223
224
without potentially violating the version skew policy, by letting the kubelet
224
225
only communicate with the local kube-apiserver.
226
+
- Also adjust init and upgrade to result in the same configuration.
225
227
- Use a new feature gate `ControlPlaneKubeletLocalMode` to toggle the feature until
226
228
graduating to GA.
227
229
@@ -234,7 +236,7 @@ and make progress.
234
236
235
237
- Support the "old way" and "new way" indefinitely. Once the proposed feature gate
236
238
graduates to GA it will hardcoded to be active.
237
-
- Touch areas of kubeadm different than `kubeadm join`.
239
+
- Touch areas of kubeadm different than `kubeadm join`, `kubeadm init` and `kubeadm upgrade`.
238
240
239
241
## Proposal
240
242
@@ -248,11 +250,15 @@ nitty-gritty.
248
250
-->
249
251
250
252
The proposal is to implement the required changes to make the kubelet point to the local available kube-apiserver.
251
-
This change only relates to joining control plane nodes and does not affect worker nodes.
253
+
This change relates to initializing, joining and upgrading control plane nodes and does not affect worker nodes.
252
254
253
-
The overall change is to adjust the file `/etc/kubernetes/bootstrap-kubelet.conf` to point to the local kube-apiserver, which gets created by kubeadm during the `KubeletStartJoinPhase` ([xref](https://github.com/kubernetes/kubernetes/blob/caf5311/cmd/kubeadm/app/cmd/phases/join/kubelet.go#L122-L125)).
255
+
The overall change is:
254
256
255
-
To make this work, an additional change is required: etcd needs to get started and joined to the etcd cluster before waiting for the kubelet to finish its bootstrap process, instead of the other way around.
257
+
- for `kubeadm join` to adjust the file `/etc/kubernetes/bootstrap-kubelet.conf` to point to the local kube-apiserver, which gets created by kubeadm during the `KubeletStartJoinPhase` ([xref](https://github.com/kubernetes/kubernetes/blob/caf5311/cmd/kubeadm/app/cmd/phases/join/kubelet.go#L122-L125)). This will also affect the kubelet's kubeconfig.
258
+
- for `kubeadm init` to adjust the created kubeconfig to point to the local kube-apiserver, which gets created by kubeadm during the `kubeconfig` phase ([xref](https://github.com/kubernetes/kubernetes/blob/8871513c1b64cae321552abfe9a3a90969637560/cmd/kubeadm/app/cmd/phases/init/kubeconfig.go#L87))
259
+
- for `kubeadm upgrade` to edit the kubelet config file to point to the local kube-apiserver.
260
+
261
+
To make this work for `kubeadm join`, an additional change is required: etcd needs to get started and joined to the etcd cluster before waiting for the kubelet to finish its bootstrap process, instead of the other way around.
256
262
This requires reordering some of the operations done in different kubeadm phases by extracting the relevant parts into separate phases and changing their order.
257
263
258
264
Because reordering the phases can be considered a breaking change to the CLI of kubeadm for some users, this should get done behind a feature gate, while preserving the previous behavior when the feature gate is disabled.
@@ -278,6 +284,10 @@ As a kubeadm user, I wish the kubelet of a joining control plane node points to
278
284
279
285
As a kubeadm user, I wish the CLI of kubeadm to be stable and breaking changes to it to be announced ahead of time.
280
286
287
+
#### Story 4
288
+
289
+
As a kubeadm user, I wish the kubelet of an initializing control plane node points to the local kube-apiserver.
290
+
281
291
### Notes/Constraints/Caveats (Optional)
282
292
283
293
<!--
@@ -341,9 +351,15 @@ As explained above two minor changes are required to implement the required chan
341
351
342
352
**1. Make the kubelet point to the local kube-apiserver**
343
353
344
-
To make the kubelet point to the local apiserver, the file for kubelet's bootstrap kubeconfig
345
-
needs to get adjusted, which gets created by kubeadm during the
0 commit comments