Skip to content

Commit a4cf338

Browse files
Mark KEP-2568 as implementable.
1 parent 54e4141 commit a4cf338

File tree

2 files changed

+21
-9
lines changed
  • keps/sig-cluster-lifecycle/kubeadm/2568-kubeadm-non-root-control-plane

2 files changed

+21
-9
lines changed

keps/sig-cluster-lifecycle/kubeadm/2568-kubeadm-non-root-control-plane/README.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ tags, and then generate with `hack/update-toc.sh`.
9393
- [Updating the component manifests](#updating-the-component-manifests)
9494
- [Host Volume Permissions](#host-volume-permissions)
9595
- [Shared files](#shared-files)
96+
- [Reusing users and groups](#reusing-users-and-groups)
97+
- [Cleaning up users and groups](#cleaning-up-users-and-groups)
9698
- [Multi OS support](#multi-os-support)
9799
- [Test Plan](#test-plan)
98100
- [Graduation Criteria](#graduation-criteria)
@@ -131,9 +133,9 @@ checklist items _must_ be updated for the enhancement to be released.
131133
Items marked with (R) are required *prior to targeting to a milestone / release*.
132134

133135
- [x] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
134-
- [ ] (R) KEP approvers have approved the KEP status as `implementable`
135-
- [ ] (R) Design details are appropriately documented
136-
- [ ] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors)
136+
- [x] (R) KEP approvers have approved the KEP status as `implementable`
137+
- [x] (R) Design details are appropriately documented
138+
- [x] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors)
137139
- [x] (R) Graduation criteria is in place
138140
- [x] (R) Production readiness review completed
139141
- [x] (R) Production readiness review approved
@@ -250,7 +252,7 @@ bogged down.
250252

251253
#### Story 1
252254

253-
As a security conscious user I would like to run the kubernetes control-plane as non-root.
255+
As a security conscious user I would like to run the kubernetes control-plane as non-root to reduce the risk associated with container escape vulnerabilities in the control-plane.
254256

255257
#### Story 2
256258

@@ -304,7 +306,7 @@ There are 3 options for setting the `UID`/`GID` of the control-plane components:
304306

305307
3. **Create system users and let users override the defaults:** Use `adduser --system` or equivalent to create `UID`s in the SYS_UID_MIN - SYS_UID_MAX range and `groupadd --system` or equivalent to create `GID`s in the SYS_GID_MIN - SYS_GID_MAX range. Additionally if users want to specify their own `UID`s or `GID`s we will support that through `kubeadm` patching.
306308

307-
The author(s) believes that starting out with a safe default of option 3. and allowing the user to set the `UID` and `GID` through the `kubeadm` patching mechanism is more user-friendly for users who just wan't to quickly bootstrap and also users who care about which `UID`s and `GID`s that they want to run the control-plane as and also users . Further this feature will be opt-in and will be hidden behind a feature-gate.
309+
The author(s) believes that starting out with a safe default of option 3. and allowing the user to set the `UID` and `GID` through the `kubeadm` patching mechanism is more user-friendly for users who just wan't to quickly bootstrap and also users who care about which `UID`s and `GID`s that they want to run the control-plane as and also users . Further this feature will be opt-in and will be hidden behind a feature-gate, until it graduates to GA.
308310

309311
Choosing the `UID` between SYS_UID_MIN and SYS_UID_MAX and `GID` between SYS_GID_MIN and SYS_GID_MAX is in adherence with distro standards.
310312
* For Debian : https://www.debian.org/doc/debian-policy/ch-opersys.html#uid-and-gid-classes
@@ -569,7 +571,7 @@ spec:
569571
... # omitted to save space.
570572
```
571573

572-
Each of the components will run with a unique `UID` and `GID`. For each of the components we will create a unique user. For the shared files/resources we will create groups. The naming convention of these groups is tabulated below.
574+
Each of the components will run with a unique `UID` and `GID`. For each of the components we will create a unique user. For the shared files/resources we will create groups. The naming convention of these groups is tabulated below. It should be noted that `kubeadm` will take exclusive ownership of these users/groups and will throw erros if users/groups with these names exist and are not in the expected ID range of `SYS_UID_MIN`-`SYS_UID_MAX` for users and `SYS_GID_MIN`-`SYS_GID_MAX` for groups.
573575

574576
| User/Group name | Explanation |
575577
|--------------|-------------|
@@ -617,6 +619,15 @@ In addition to the file/directories in that table above the control-plane compon
617619
- /etc/ssl/certs
618620
- /etc/ca-certificates
619621

622+
### Reusing users and groups
623+
624+
If any of the users/groups defined above exist already and are in the expected ID range of `SYS_UID_MIN`-`SYS_UID_MAX` for users and `SYS_GID_MIN`-`SYS_GID_MAX` for groups, then `kubeadm` will reuse these instead of creating new ones. More specifically `kubeadm` will reuse the ones that exist and meet the criteria and will create the ones that it needs.
625+
626+
### Cleaning up users and groups
627+
628+
`kubeadm reset` tries to remove everything created by `kubeadm` on the host and it should do this for the users and groups that it creates as part of cluster bootstrap.
629+
630+
620631
### Multi OS support
621632

622633
A Windows control plane is out of scope for this proposal for the time being. OS specific implementations for Linux, would be carefully abstracted behind helper utilities in kubeadm to not block the support for a Windows control plane in the future.
@@ -645,7 +656,7 @@ Following functionality needs to be tested:
645656
1. With feature-gate=True create a cluster
646657
2. With feature-gate=True upgrade a cluster
647658

648-
These tests will be added using the [kinder](https://github.com/kubernetes/kubeadm/tree/master/kinder) tooling.
659+
These tests will be added using the [kinder](https://github.com/kubernetes/kubeadm/tree/master/kinder) tooling during the Alpha stage.
649660

650661
### Graduation Criteria
651662

@@ -710,7 +721,7 @@ in back-to-back releases.
710721
- All control-plane components have `runtime/default` seccomp profile.
711722
- All control-plane components drop all unnecessary capabilities.
712723
- The feature is tested by the community and feedback is adapted with changes.
713-
- e2e tests created and running periodically, but may not be completely green.
724+
- e2e tests are running periodically and are green with respect to testing this functionality.
714725
- `kubeadm` documentation is updated.
715726

716727
### Upgrade / Downgrade Strategy
@@ -1059,6 +1070,7 @@ Major milestones:
10591070
- Initial draft of KEP created - 2021-03-13
10601071
- Production readiness review - 2021-04-12
10611072
- Production readiness review approved - 2021-04-29
1073+
- KEP marked implementable - 2021-04-28
10621074

10631075
## Drawbacks
10641076

keps/sig-cluster-lifecycle/kubeadm/2568-kubeadm-non-root-control-plane/kep.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors:
55
owning-sig: sig-cluster-lifecycle
66
participating-sigs:
77
- sig-security
8-
status: provisional
8+
status: implementable
99
creation-date: 2021-03-13
1010
reviewers:
1111
- "@neolit123"

0 commit comments

Comments
 (0)