@@ -348,33 +348,30 @@ called. On later upgrades, one release after this feature is added, the certific
348
348
renewal logic of ` kubeadm upgrade ` must be aware that the ` super-admin.conf ` file could
349
349
be missing and should not be rotated.
350
350
351
- Updating the ` kube-system/kubeadm-certs ` Secret contents where an encrypted
352
- ` admin.conf ` is stored will not be updated during upgrade.
353
-
354
351
The mitigation here is detailed unit tests and e2e tests that ensure that
355
352
the migration for in-place upgrades is handled properly.
356
353
357
354
#### Risk: Implementation complexity during re-place upgrade
358
355
359
356
Users or higher level tools that manage kubeadm re-place upgrades, by removing old
360
357
control plane nodes and adding new control plane nodes, without calling
361
- ` kubeadm upgrade apply/node ` should handle this transition manually.
362
- The RBAC ClusterRoleBinding ` kubeadm:cluster-admins ` must be created before
363
- the upgrade has started. A new ` admin.conf ` that has the subject:
364
- ` O = kubeadm:cluster-admins, CN = kubernetes- admin` must be uploaded in the
365
- ` kube-system/ kubeadm-certs ` Secret and encrypted with the appropriate certificate key .
366
- Joining control plane nodes, must be able to download and decrypt the new ` admin.conf ` .
367
-
368
- Again, tests will be required to ensure that the ` admin.conf ` subject is migrated
369
- properly. The ` super-admin.conf ` file will not exist at all under such conditions,
370
- therefore the administrator can sign one manually by using
371
- the ` kubeadm kubeconfig user --client-name=kubernetes-super-admin --org=system:masters `
372
- command.
373
-
374
- The same users or higher level tools can decide not to opt- in into this
375
- new behavior for existing clusters and continue using the ` admin.conf ` with
376
- ` system:masters ` . However, this means such clusters will drift away
377
- from the kubeadm security defaults .
358
+ ` kubeadm upgrade apply/node ` must handle this transition manually.
359
+ The ClusterRoleBinding ` kubeadm:cluster-admins ` must be created before
360
+ the upgrade has started. The ` kubeadm join ` process for control plane nodes
361
+ will create new ` admin.conf ` files with certificates that bind to the
362
+ ` kubeadm:cluster-admins ` Group .
363
+
364
+ Again, tests will be required to ensure that the ` admin.conf ` works
365
+ properly and the ClusterRoleBinding ` kubeadm:cluster-admins ` exists.
366
+
367
+ The ` super-admin.conf ` file will not exist at all in such clusters,
368
+ that were upgraded from older versions of kubeadm. The administrator can sign
369
+ a ` super-admin.conf ` manually by using the
370
+ ` kubeadm kubeconfig user --client-name=kubernetes-super-admin --org=system:masters `
371
+ command and store it in a safe location.
372
+
373
+ For new clusters of this kind, the ` super-admin.conf ` will exist on the node
374
+ where ` kubeadm init ` was called. It can be left untouched or manually moved .
378
375
379
376
## Design Details
380
377
@@ -403,18 +400,21 @@ existing tests to make this code solid enough prior to committing the changes ne
403
400
to implement this enhancement.
404
401
405
402
kubeadm will include new unit tests to ensure the new separate admin files are
406
- generated properly. During init/join-control-plane/upgrade the existing
407
- [ kinder] ( https://git.k8s.io/kubeadm/kinder ) upgrade e2e test jobs will
408
- test this functionality.
409
-
410
- One additional integration test can be added in ` cmd/kubeadm/test ` . It can be maintained
411
- for one or more releases until more users upgrade to the first release where this
412
- feature is available. It can do the following (can vary, subject to implementation details):
413
- - Calls ` kubeadm init phase certs ca ` .
414
- - Calls ` kubeadm init phase kubeconfig admin ` .
415
- - Checks if two admin kubeconfig files are generated.
416
- - Calls ` kubeadm certs renew admin.conf ` and verifies whether the kubeconfig files
417
- are updated.
403
+ generated properly.
404
+
405
+ One additional e2e test will be added in the kubernetes/kubeadm repository
406
+ by using the kinder tool. It can be maintained for one or more releases until
407
+ more users upgrade to the first release where this feature is available.
408
+ It can do the following:
409
+ - Creates a 3 control plane node cluster that has the latest kubeadm installed.
410
+ - Calls ` kubeadm init ` on one of them.
411
+ - Verifies that kubeconfig files and RBAC are setup properly.
412
+ - Calls ` kubeadm join ` on the remaining control plane nodes.
413
+ - Verifies the kubeconfig files on the remaining control plane nodes.
414
+ - Deletes the ` super-admin.conf ` file from the first control plane node.
415
+ - Deletes the ` kubeadm:cluster-admins ` ClusterRoleBinding.
416
+ - Calls ` kubeadm upgrade ` using the same kubeadm version.
417
+ - Ensures that the RBAC and ` super-admin.conf ` are recreated.
418
418
419
419
##### Prerequisite testing updates
420
420
@@ -472,8 +472,7 @@ https://storage.googleapis.com/k8s-triage/index.html
472
472
473
473
<!-- - <test>: <link to test coverage> -->
474
474
475
- One new integration test can be added here:
476
- - ` cmd/kubeadm/test `
475
+ NONE
477
476
478
477
##### e2e tests
479
478
@@ -489,8 +488,7 @@ We expect no non-infra related flakes in the last month as a GA graduation crite
489
488
490
489
<!-- - <test>: <link to test coverage> -->
491
490
492
- The functionality will be exercised by the existing regular and upgrade e2e tests
493
- that use the kinder tool.
491
+ A new e2e test will be added by using the kinder tool.
494
492
495
493
### Graduation Criteria
496
494
@@ -631,8 +629,9 @@ Major milestones might include:
631
629
- when the KEP was retired or superseded
632
630
-->
633
631
634
- - 18.09.2023: KEP created (1.29)
632
+ - 18.09.2023: KEP created (1.29).
635
633
- 10.10.2023: Address minor feedback. KEP marked as implementable.
634
+ - 10.19.2023: Adjust test plan and risk / mitigations.
636
635
637
636
## Drawbacks
638
637
0 commit comments