Skip to content
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

Merged
merged 3 commits into from
Jul 8, 2021

Conversation

neolit123
Copy link
Member

@neolit123 neolit123 commented Jun 9, 2021

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.

@k8s-ci-robot k8s-ci-robot added this to the 1.22 milestone Jun 9, 2021
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 9, 2021
@k8sio-netlify-preview-bot
Copy link
Collaborator

k8sio-netlify-preview-bot commented Jun 9, 2021

👷 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

@k8s-ci-robot k8s-ci-robot added language/en Issues or PRs related to English language sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 9, 2021
@neolit123
Copy link
Member Author

/kind feature
/sig cluster-lifecycle
/cc @tengqm @pacoxu

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. labels Jun 9, 2021
@neolit123 neolit123 mentioned this pull request Jun 9, 2021
16 tasks
Comment on lines -351 to -367
## 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-
```

Copy link
Member Author

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
Copy link
Contributor

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?

Copy link
Member Author

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.
@pacoxu
Copy link
Member

pacoxu commented Jun 10, 2021

/lgtm
for the version change here.

There may be some TODO for kubernetes/kubeadm#1796

  • P0: remove DNS.Type: remove kube-dns related
  • P0: remove useHyperkubeImage

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 10, 2021
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: f134ae661f8b71f0e60622f458ef7512422348f6

@neolit123
Copy link
Member Author

neolit123 commented Jun 10, 2021 via email

Copy link
Member

@pacoxu pacoxu left a 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

@tengqm
Copy link
Contributor

tengqm commented Jun 16, 2021

/lgtm

@PI-Victor
Copy link
Member

@neolit123 are all the code changes that enable this docs change merged at this point?

/assign
/hold

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 1, 2021
@neolit123
Copy link
Member Author

this PR now includes two more commits relevant to kubeadm's API v1beta3 and v1.22.

kubeadm/control-plane-flags: update the page to include general details …

- Re-purpose the page to include more general details about
customizing components.
- Add details about using patches via the config API (v1.22 feature).
kubeadm/init-join.md: add note about using "skipPhases" from config

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.


- `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.
Copy link
Member

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

Copy link
Member Author

@neolit123 neolit123 Jul 2, 2021

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.


{{< note >}}
Duplicate flags (keys), or passing the same flag `--foo` multiple times, is currently not supported.
Copy link
Member

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)? 🤔

Copy link
Member Author

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.

@pacoxu
Copy link
Member

pacoxu commented Jul 2, 2021

Overall LGTM. Only some small nit for some existing part 😓.

@pacoxu
Copy link
Member

pacoxu commented Jul 5, 2021

/lgtm
ping @jimangel for approval

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 5, 2021
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 5a9dd6753daf06385b65597e76b7f638dca5e1af

- 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.
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 6, 2021
@neolit123
Copy link
Member Author

@PI-Victor updated, thanks for the review.

@PI-Victor
Copy link
Member

/lgtm
/approve

thanks for taking the time for the PR, since this enhancement is not 'At Risk', we can go ahead an wrap it up.

@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 3bb199404ccce9b1a2704c1d856918e84f7134c5

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 6, 2021
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 6, 2021
@neolit123
Copy link
Member Author

if this is good to go, please lift the hold.
@tengqm wants to do a follow up with some link updates.
#28862

@PI-Victor
Copy link
Member

damn, my bad!

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 8, 2021
@k8s-ci-robot k8s-ci-robot merged commit 4c6a904 into kubernetes:dev-1.22 Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. language/en Issues or PRs related to English language lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants