-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kubeadm: use the new v1beta3 instead of v1beta2 #28360
Conversation
👷 Deploy Preview for kubernetes-io-vnext-staging processing. 🔨 Explore the source changes: 3437d01 🔍 Inspect the deploy log: https://app.netlify.com/sites/kubernetes-io-vnext-staging/deploys/60e4b4648ca30d00077413f5 |
86cd339
to
241f2a3
Compare
## The NodeRegistration.Taints field is omitted when marshalling kubeadm configuration | ||
|
||
*Note: This [issue](https://github.com/kubernetes/kubeadm/issues/1358) only applies to tools that marshal kubeadm types (e.g. to a YAML configuration file). It will be fixed in kubeadm API v1beta2.* | ||
|
||
By default, kubeadm applies the `node-role.kubernetes.io/master:NoSchedule` taint to control-plane nodes. | ||
If you prefer kubeadm to not taint the control-plane node, and set `InitConfiguration.NodeRegistration.Taints` to an empty slice, | ||
the field will be omitted when marshalling. When the field is omitted, kubeadm applies the default taint. | ||
|
||
There are at least two workarounds: | ||
|
||
1. Use the `node-role.kubernetes.io/master:PreferNoSchedule` taint instead of an empty slice. [Pods will get scheduled on masters](/docs/concepts/scheduling-eviction/taint-and-toleration/), unless other nodes have capacity. | ||
|
||
2. Remove the taint after kubeadm init exits: | ||
```bash | ||
kubectl taint nodes NODE_NAME node-role.kubernetes.io/master:NoSchedule- | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing this entry since it affects the v1beta1 API which is being removed in 1.22.
newer APIs are not affected.
@@ -17,7 +17,7 @@ Print configuration | |||
|
|||
|
|||
This command prints configurations for subcommands provided. | |||
For details, see: https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2 | |||
For details, see: https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @neolit123 .
Some of the files in this PR are auto-generated.
Do you expect the changes to be generated from the source code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that was an oversight. the source code should produce the "v1beta3" change.
updated.
In 1.22 kubeadm is adding a new API version - v1beta3. Adapt links and examples to use v1beta3 instead of v1beta2. v1beta2 is not deprecated yet, but v1beta3 is preferred at this point.
241f2a3
to
fa3efa1
Compare
/lgtm There may be some TODO for kubernetes/kubeadm#1796
|
LGTM label has been added. Git tree hash: f134ae661f8b71f0e60622f458ef7512422348f6
|
We did the dns type and hyperkube cleanups when we removed the features
from k/k master. Are you seeing something that we missed?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, Currently no. I will go through it later.
/assign @jimangel
/lgtm |
@neolit123 are all the code changes that enable this docs change merged at this point? /assign |
this PR now includes two more commits relevant to kubeadm's API v1beta3 and v1.22.
|
|
||
- `apiServer` | ||
- `controllerManager` | ||
- `scheduler` | ||
- `etcd` | ||
|
||
The `extraArgs` field consist of `key: value` pairs. To override a flag for a control plane component: | ||
|
||
1. Add the appropriate fields to your configuration. | ||
2. Add the flags to override to the field. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to override to the field
to
to override the field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reworded this block and list to clarify the concepts of structures / field.
content/en/docs/setup/production-environment/tools/kubeadm/control-plane-flags.md
Outdated
Show resolved
Hide resolved
|
||
{{< note >}} | ||
Duplicate flags (keys), or passing the same flag `--foo` multiple times, is currently not supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or passing the same flag `--foo` multiple times
Does this dup with duplicate flags(keys)
? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's just a clarification for the first part of the sentence.
Overall LGTM. Only some small nit for some existing part 😓. |
6b81fce
to
0a52d89
Compare
/lgtm |
LGTM label has been added. Git tree hash: 5a9dd6753daf06385b65597e76b7f638dca5e1af
|
content/en/docs/setup/production-environment/tools/kubeadm/control-plane-flags.md
Outdated
Show resolved
Hide resolved
content/en/docs/setup/production-environment/tools/kubeadm/control-plane-flags.md
Outdated
Show resolved
Hide resolved
content/en/docs/setup/production-environment/tools/kubeadm/control-plane-flags.md
Outdated
Show resolved
Hide resolved
content/en/docs/setup/production-environment/tools/kubeadm/control-plane-flags.md
Outdated
Show resolved
Hide resolved
content/en/docs/setup/production-environment/tools/kubeadm/control-plane-flags.md
Outdated
Show resolved
Hide resolved
- Re-purpose the page to include more general details about customizing components. - Add details about using patches via the config API (v1.22 feature).
Since 1.22 it will be possible to skip phases using the configuration file. Add note about that in the relevant sections of the kubeadm init and join reference pages.
0a52d89
to
3437d01
Compare
@PI-Victor updated, thanks for the review. |
/lgtm thanks for taking the time for the PR, since this enhancement is not 'At Risk', we can go ahead an wrap it up. |
LGTM label has been added. Git tree hash: 3bb199404ccce9b1a2704c1d856918e84f7134c5
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pacoxu, PI-Victor The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
damn, my bad! /hold cancel |
In 1.22 kubeadm is adding a new API version - v1beta3.
Adapt links and examples to use v1beta3 instead of v1beta2.
v1beta2 is not deprecated yet, but v1beta3 is preferred
at this point.
xref kubernetes/kubeadm#1796
v1beta3 is already available; no required PRs are needed before this k/website change merges.the PR also includes changes specific to v1beta3 in a few pages, documenting new features.
note: also includes some whitespace cleanup by my text editor.