Skip to content

Commit 0f18033

Browse files
authored
Merge pull request kubernetes#2068 from neolit123/1.20-rename-master-label-taint
sig-cl/kubeadm: add KEP for renaming the "master" label and taint
2 parents 93e000c + 172d9a1 commit 0f18033

File tree

2 files changed

+335
-0
lines changed

2 files changed

+335
-0
lines changed
Lines changed: 320 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,320 @@
1+
# KEP-2067: Rename the kubeadm "master" label and taint
2+
3+
<!-- toc -->
4+
- [Release Signoff Checklist](#release-signoff-checklist)
5+
- [Summary](#summary)
6+
- [Motivation](#motivation)
7+
- [Goals](#goals)
8+
- [Non-Goals](#non-goals)
9+
- [Proposal](#proposal)
10+
- [User Stories (optional)](#user-stories-optional)
11+
- [Administrator](#administrator)
12+
- [Administrator (single node)](#administrator-single-node)
13+
- [Developer](#developer)
14+
- [Developer (higher up the stack)](#developer-higher-up-the-stack)
15+
- [Notes/Constraints/Caveats (optional)](#notesconstraintscaveats-optional)
16+
- [Risks and Mitigations](#risks-and-mitigations)
17+
- [Risk 1](#risk-1)
18+
- [Design Details](#design-details)
19+
- [Renaming the &quot;node-role.kubernetes.io/master&quot; Node label](#renaming-the-node-rolekubernetesiomaster-node-label)
20+
- [Renaming the &quot;node-role.kubernetes.io/master&quot; Node taint](#renaming-the-node-rolekubernetesiomaster-node-taint)
21+
- [Test Plan](#test-plan)
22+
- [Graduation Criteria](#graduation-criteria)
23+
- [Removing a Deprecated Flag](#removing-a-deprecated-flag)
24+
- [Upgrade / Downgrade Strategy](#upgrade--downgrade-strategy)
25+
- [Version Skew Strategy](#version-skew-strategy)
26+
- [Production Readiness Review Questionnaire](#production-readiness-review-questionnaire)
27+
- [Feature Enablement and Rollback](#feature-enablement-and-rollback)
28+
- [Rollout, Upgrade and Rollback Planning](#rollout-upgrade-and-rollback-planning)
29+
- [Monitoring Requirements](#monitoring-requirements)
30+
- [Dependencies](#dependencies)
31+
- [Scalability](#scalability)
32+
- [Troubleshooting](#troubleshooting)
33+
- [Implementation History](#implementation-history)
34+
- [Drawbacks](#drawbacks)
35+
- [Alternatives](#alternatives)
36+
- [Hard transition](#hard-transition)
37+
- [Using a feature gate](#using-a-feature-gate)
38+
- [Infrastructure Needed (Optional)](#infrastructure-needed-optional)
39+
<!-- /toc -->
40+
41+
## Release Signoff Checklist
42+
43+
Items marked with (R) are required *prior to targeting to a milestone / release*.
44+
45+
- [x] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
46+
- [x] (R) KEP approvers have approved the KEP status as `implementable`
47+
- [x] (R) Design details are appropriately documented
48+
- [x] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input
49+
- [x] (R) Graduation criteria is in place
50+
- [x] (R) Production readiness review completed
51+
- [ ] Production readiness review approved
52+
- [x] "Implementation History" section is up-to-date for milestone
53+
- [ ] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
54+
- [ ] Supporting documentation e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
55+
56+
[kubernetes.io]: https://kubernetes.io/
57+
[kubernetes/enhancements]: https://git.k8s.io/enhancements
58+
[kubernetes/kubernetes]: https://git.k8s.io/kubernetes
59+
[kubernetes/website]: https://git.k8s.io/website
60+
61+
## Summary
62+
63+
Kubeadm applies a "node-role" label to its control plane Nodes.
64+
Currently this label key is `node-role.kubernetes.io/master` and it should
65+
be renamed to `node-role.kubernetes.io/control-plane`. Kubeadm also uses the
66+
same "node-role" as key for a taint it applies on control plane Nodes.
67+
This taint key should also be renamed to "node-role.kubernetes.io/control-plane".
68+
69+
## Motivation
70+
71+
The Kubernetes project is moving away from wording that is considered offensive.
72+
A new working group [WG Naming](https://git.k8s.io/community/wg-naming) was created
73+
to track this work, and the word "master" was declared as offensive.
74+
This means it should be removed from source code, documentation, and user-facing
75+
configuration from all Kubernetes projects.
76+
77+
### Goals
78+
79+
- Use "control-plane" instead of "master" in the key of the label
80+
and taint set by kubeadm.
81+
- Apply proper deprecation policies to minimize friction with users
82+
facing the change.
83+
- Notify users in release notes and on communication channels such as the
84+
kubernetes-dev mailing list.
85+
86+
### Non-Goals
87+
88+
- Hard rename the kubeadm "master" label and taint keys to "control-plane"
89+
within a single release.
90+
- Leave users in the dark about the change.
91+
92+
## Proposal
93+
94+
### User Stories (optional)
95+
96+
#### Administrator
97+
98+
As an administrator of kubeadm-created clusters, I manage additional critical
99+
workloads on Nodes labeled and tainted with "node-role.kubernetes.io/master".
100+
This change affects me and I would like to transition my infrastructure within
101+
a grace period.
102+
103+
#### Administrator (single node)
104+
105+
As an administrator, I deploy single-control-plane Node k8s clusters.
106+
This means that I have to remove taints with the key "node-role.kubernetes.io/master".
107+
This change affects me and I would like to transition my infrastructure within
108+
a grace period.
109+
110+
#### Developer
111+
112+
As an application or addon developer, I create deployments that tolerate the
113+
"node-role.kubernetes.io/master"-keyed taint or label-select the
114+
"node-role.kubernetes.io/master"-labeled Nodes. This change affects me and I would
115+
like to adapt my manifests within a grace period.
116+
117+
#### Developer (higher up the stack)
118+
119+
As a developer of a tool that sits on top of kubeadm in the stack, I have to adapt
120+
my source code to handle the renaming of the "master" label / taint. Managed by my tool,
121+
a version of kubeadm that no longer includes the "master" label / taint would require
122+
special handling.
123+
124+
### Notes/Constraints/Caveats (optional)
125+
126+
None
127+
128+
### Risks and Mitigations
129+
130+
#### Risk 1
131+
132+
Users not having enough visibility about the change, which results in
133+
breaking their setup.
134+
135+
_Mitigation_
136+
137+
Make sure the change is announced on all possible channels:
138+
- Include "action-required" release notes in all appropriate stages
139+
of the change.
140+
- Notify #kubeadm and #sig-cluster-lifecycle channels on k8s slack.
141+
- Notify the SIG Cluster Lifecycle and kubernetes-dev mailing lists.
142+
- Ask Twitter / Reddit users to post about the change.
143+
144+
## Design Details
145+
146+
The process will be broken into multiple stages:
147+
- Primary - 1.20
148+
- Secondary - Minimum deprecation period for GA features is 1 year.
149+
Estimated 1.24, but may depend on user feedback.
150+
- Third - one release after Secondary
151+
- Fourth - one release after Third
152+
153+
### Renaming the "node-role.kubernetes.io/master" Node label
154+
155+
Primary stage:
156+
- Introduce the "node-role.kubernetes.io/control-plane" label in parallel to
157+
the "master" label.
158+
- Announce to users that they should adapt to use the new label.
159+
Secondary stage:
160+
- Remove the "master" label and announce it to the users.
161+
162+
### Renaming the "node-role.kubernetes.io/master" Node taint
163+
164+
Primary stage:
165+
- Introduce the "node-role.kubernetes.io/control-plane:NoSchedule" toleration
166+
in the CoreDNS Deployment of kubeadm.
167+
- Announce to users that they should do that same for their workloads.
168+
Secondary stage:
169+
- Add the "node-role.kubernetes.io/control-plane:NoSchedule" taint to Nodes.
170+
Third stage:
171+
- Remove the "node-role.kubernetes.io/master:NoSchedule" taint from Nodes.
172+
Fourth stage:
173+
- Remove the "node-role.kubernetes.io/master:NoSchedule" toleration in the CoreDNS
174+
Deployment of kubeadm
175+
- Announce to users that they should remove tolerations for the "master" taint in
176+
their workloads.
177+
178+
### Test Plan
179+
180+
Reuse the existing kubeadm upgrade tests (mutable upgrades) and Cluster API
181+
(immutable upgrades) for testing the rollout of the change.
182+
183+
### Graduation Criteria
184+
185+
Not applicable.
186+
187+
#### Removing a Deprecated Flag
188+
189+
Not applicable.
190+
191+
### Upgrade / Downgrade Strategy
192+
193+
Downgrades are not supported by kubeadm.
194+
195+
For upgrades:
196+
- During the primary stage new Nodes in the cluster will be added with
197+
the "node-role.kubernetes.io/control-plane" label in parallel to the
198+
"node-role.kubernetes.io/master" label.
199+
The "node-role.kubernetes.io/control-plane:NoSchedule" toleration will
200+
be added to the kubeadm CoreDNS Deployment of kubeadm so that it
201+
tolerates both old and new nodes.
202+
- During the secondary stage the "master" label will be removed from new
203+
Nodes. User infrastructure must only manage the "control-plane" label
204+
at that point. New nodes will also have the
205+
"node-role.kubernetes.io/control-plane:NoSchedule" taint.
206+
- During the third stage, new Nodes will only have the
207+
"node-role.kubernetes.io/control-plane:NoSchedule" taint and the
208+
"node-role.kubernetes.io/master:NoSchedule" taint will not be present.
209+
- During the fourth stage the CoreDNS deployment of kubeadm will
210+
have its toleration for the "node-role.kubernetes.io/master:NoSchedule"
211+
taint removed.
212+
213+
### Version Skew Strategy
214+
215+
See above.
216+
217+
## Production Readiness Review Questionnaire
218+
219+
### Feature Enablement and Rollback
220+
221+
_This section must be completed when targeting alpha to a release._
222+
223+
* **How can this feature be enabled / disabled in a live cluster?**
224+
225+
The new label / taint will be enabled in parallel to the old ones.
226+
After a GA period the old label / taint will be removed.
227+
228+
* **Does enabling the feature change any default behavior?**
229+
230+
Removing the old label / taint can introduce changes in behavior.
231+
232+
* **Can the feature be disabled once it has been enabled (i.e. can we roll back
233+
the enablement)?**
234+
235+
Users can opt-out of the new default label / taint that kubeadm places
236+
on control-plane Nodes, and use the old "master" label / taint.
237+
238+
* **What happens if we reenable the feature if it was previously rolled back?**
239+
240+
There should be no problems around that, as long as the workloads
241+
tolerate the right label / taints.
242+
243+
* **Are there any tests for feature enablement/disablement?**
244+
245+
The standard kubeadm upgrade tests can catch problems around the feature enablement.
246+
247+
### Rollout, Upgrade and Rollback Planning
248+
249+
* **How can a rollout fail? Can it impact already running workloads?**
250+
251+
The change can affect execution of workloads. Workloads must be adapted
252+
to tolerate the eventual removal of the "master" label / taint and the
253+
introduction of the "control-plane" label / taint. If a version of kubeadm
254+
that upgrades a cluster to a new version that no longer has the old label / taint,
255+
this would require patching the workload manifests.
256+
257+
* **What specific metrics should inform a rollback?**
258+
259+
Not applicable.
260+
261+
* **Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?**
262+
263+
This is not a supported scenario, as kubeadm does not support downgrade. However,
264+
it can restore control-plane static Pod manifests in case the upgrade operation failed.
265+
266+
* **Is the rollout accompanied by any deprecations and/or removals of features, APIs,
267+
fields of API types, flags, etc.?**
268+
Even if applying deprecation policies, they may still surprise some users.
269+
270+
The final stage of the change will apply the removal of the old label / taint,
271+
272+
### Monitoring Requirements
273+
274+
Not applicable.
275+
276+
### Dependencies
277+
278+
Not applicable.
279+
280+
### Scalability
281+
282+
Not applicable.
283+
284+
### Troubleshooting
285+
286+
Not applicable.
287+
288+
## Implementation History
289+
290+
- 2020-10-03 - initial provisional KEP created
291+
- 2020-10-05 - KEP marked as implementable
292+
293+
## Drawbacks
294+
295+
None.
296+
297+
## Alternatives
298+
299+
### Hard transition
300+
301+
An alternative is to hard transition to the new key for the label and taint,
302+
within one version, which was already mentioned as a non-goal in this KEP.
303+
304+
### Using a feature gate
305+
306+
Using a feature gate was discussed, where:
307+
- During ALPHA ("false" by default) the option to use the new label / taint
308+
will be added, where users can switch to use the new keys for the label / taint.
309+
- During BETA ("true" by default) the new label / taint will be used by default.
310+
- For GA, the FG will be locked to true and deprecated. Then removed after
311+
one more release.
312+
313+
The problem with this is that during BETA, the feature becoming "true" by default
314+
will break the users in a similar fashion to a hard-transition. The feature gate
315+
usage here would not introduce benefits over the main proposal, but would
316+
introduce some maintenance overhead.
317+
318+
## Infrastructure Needed (Optional)
319+
320+
None.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
title: Rename the kubeadm "master" label and taint
2+
kep-number: 2067
3+
authors:
4+
- "@neolit123"
5+
owning-sig: sig-cluster-lifecycle
6+
participating-sigs:
7+
- sig-cluster-lifecycle
8+
status: implementable
9+
creation-date: 2020-10-03
10+
reviewers:
11+
- "@fabriziopandini"
12+
approvers:
13+
- "@fabriziopandini"
14+
15+
latest-milestone: "v1.20"

0 commit comments

Comments
 (0)