Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

kubeadm: add separate page for configuring / migrating cgroup driver #26786

Merged

Conversation

neolit123
Copy link
Member

@neolit123 neolit123 commented Mar 1, 2021

  • Add the new page "Configuring a cgroup driver"
    The page includes details on how to configure the cgroup driver
    using kubeadm. It also includes a migration guide for users to
    move to the "systemd" driver.
  • Link to the new page from install-kubeadm.md and container-runtimes.md

xref
kubernetes/kubeadm#2376
kubernetes/kubernetes#99471
xref #22916

note: this is targeting the 1.21 release

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 1, 2021
@k8s-ci-robot k8s-ci-robot requested review from bart0sh and onlydole March 1, 2021 22:22
@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. labels Mar 1, 2021
@neolit123 neolit123 changed the base branch from master to dev-1.21 March 1, 2021 22:23
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 1, 2021
@netlify
Copy link

netlify bot commented Mar 1, 2021

Deploy preview for kubernetes-io-master-staging ready!

Built with commit 987e065

https://deploy-preview-26786--kubernetes-io-master-staging.netlify.app

@neolit123 neolit123 force-pushed the 1.21-cgroup-drivers-new-page branch from 987e065 to 206051a Compare March 1, 2021 22:35
@k8sio-netlify-preview-bot
Copy link
Collaborator

k8sio-netlify-preview-bot commented Mar 1, 2021

Deploy preview for kubernetes-io-vnext-staging processing.

Building with commit 2355094

https://app.netlify.com/sites/kubernetes-io-vnext-staging/deploys/6041616fcd3a3b0008b4d609

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Mar 1, 2021
@neolit123
Copy link
Member Author

/sig cluster-lifecycle

@k8s-ci-robot k8s-ci-robot added the sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. label Mar 1, 2021
@neolit123
Copy link
Member Author

/cc @fabriziopandini @SataQiu @pacoxu

Comment on lines 34 to 40
{{< note >}}
If the user is not setting the `cgroupDriver` field under `KubeletConfiguration`,
`kubeadm init` will default it to `systemd`.
{{< /note >}}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is new to kubeadm 1.21

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add "starting for v1.21" and "for older releases, the user should executed following steps manually"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think the point of the versioned docs (this PR is targeting dev-1.21) is that all details apply to the target release - i.e. 1.21.

maybe we can use some sort of version tag for this.
will defer to sig-docs for this question.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added: {{< feature-state for_k8s_version="v1.21" state="stable" >}} inside the note.
not sure if that is the preferred way.

@neolit123 neolit123 force-pushed the 1.21-cgroup-drivers-new-page branch 2 times, most recently from f562dea to d3a2e15 Compare March 1, 2021 22:45
Comment on lines 34 to 40
{{< note >}}
If the user is not setting the `cgroupDriver` field under `KubeletConfiguration`,
`kubeadm init` will default it to `systemd`.
{{< /note >}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add "starting for v1.21" and "for older releases, the user should executed following steps manually"

@reylejano
Copy link
Member

/assign
/milestone 1.21

@k8s-ci-robot k8s-ci-robot added this to the 1.21 milestone Mar 2, 2021
@reylejano
Copy link
Member

/hold until kubernetes/kubernetes#99471 merges

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 2, 2021
Copy link
Member

@onlydole onlydole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you, @neolit123!

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 2, 2021

- Drain the node using `kubectl drain <node-name> --ignore-daemonsets`
- Stop the kubelet using `systemctl stop kubelet`
- Stop the container runtime
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes, we need to clean up the container runtime dir.
Not sure if this is needed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from my tests this was not needed.
we can update the guide after this PR merges if we find gaps.

@pacoxu
Copy link
Member

pacoxu commented Mar 3, 2021

LGTM

Copy link
Contributor

@binchenX binchenX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some nit.

- Add the new page "Configuring a cgroup driver"
The page includes details on how to configure the cgroup driver
using kubeadm. It also includes a migration guide for users to
move to the "systemd" driver.
- Link to the new page from install-kubeadm.md and container-runtimes.md
@neolit123 neolit123 force-pushed the 1.21-cgroup-drivers-new-page branch from d3a2e15 to 2355094 Compare March 4, 2021 22:38
@neolit123
Copy link
Member Author

updated the PR.

Copy link
Contributor

@binchenX binchenX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rdxmb
Copy link
Contributor

rdxmb commented Mar 24, 2021

can we please remove

fixes #22916

because of #22916 (comment)

---
kind: KubeletConfiguration
apiVersion: kubelet.config.k8s.io/v1beta1
cgroupDriver: systemd
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2?utm_source=godoc uses

apiVersion: kubeadm.k8s.io/v1beta2
kind: InitConfiguration
nodeRegistration:
  kubeletExtraArgs:
    cgroup-driver: "cgroupfs"

to define the cgroupfs.

Confusing...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't use kubeletExtraArgs, because the cgroup-driver flag is deprecated.
this new page has the right config example.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand. However, this is very confusing, so where is an actual full reference for the kubeadm-kubelet-config-file to configure everything in one file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are also the support forums and #kubeadm on the k8s slack for users that need help:
https://github.com/kubernetes/kubernetes/blob/master/SUPPORT.md

i will send a PR to remove the kubeletExtraArgs examples in https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2?utm_source=godoc

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are also the support forums and #kubeadm on the k8s slack for users that need help:
https://github.com/kubernetes/kubernetes/blob/master/SUPPORT.md

I know. But the docs should be the first place to search, shouldn't it?

i will send a PR to remove the kubeletExtraArgs examples in https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2?utm_source=godoc

👍

@neolit123
Copy link
Member Author

can we please remove

fixes #22916

because of #22916 (comment)

yes, we can.

@rdxmb
Copy link
Contributor

rdxmb commented Mar 24, 2021

yes, we can.

thanks!

@reylejano
Copy link
Member

/hold cancel
kubernetes/kubernetes#99471 has merged

@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 Mar 30, 2021
@reylejano
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: binchenX, onlydole, reylejano

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

Copy link
Member

@irvifa irvifa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

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

LGTM label has been added.

Git tree hash: 630c4c5b6529d926dd8822d7581032fd826dd520

@k8s-ci-robot k8s-ci-robot merged commit e7a3482 into kubernetes:dev-1.21 Mar 30, 2021
# for free to join this conversation on GitHub. Already have an account? # 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. 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.

10 participants