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

Document kernel version requirements for Linux #47363

Merged
merged 3 commits into from
Aug 27, 2024

Conversation

pacoxu
Copy link
Member

@pacoxu pacoxu commented Aug 5, 2024

Description

Starting from kubernetes/kubernetes#116799, I collected a lot of information about kernel.

And the kernel version requirement is one of the top FAQ from users when they want to choose a new OS or kernel.

Besides, some new features like RRO\ User Namespace\ cgroup v2 needs new kernels.

I try to summarize them in a page to make users clear when choosing a kernel version for their clusters.

Issue

xref kubernetes/kubernetes#116799

What's more?

This page did not include those bug-fixes or version compatibility improvement that are related to kernel versions like:

@k8s-ci-robot k8s-ci-robot added language/en Issues or PRs related to English language cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 5, 2024
@@ -86,7 +86,7 @@ The following sysctls are supported in the _safe_ set:
There are some exceptions to the set of safe sysctls:

- The `net.*` sysctls are not allowed with host networking enabled.
- The `net.ipv4.tcp_syncookies` sysctl is not namespaced on Linux kernel version 4.4 or lower.
- The `net.ipv4.tcp_syncookies` sysctl is not namespaced on Linux kernel version 4.5 or lower.
Copy link
Member Author

Choose a reason for hiding this comment

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

See torvalds/linux@12ed824 which is merged in 4.6.

Copy link

netlify bot commented Aug 5, 2024

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit af8df3a
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/66cc1a2ff05cac0008de7e54
😎 Deploy Preview https://deploy-preview-47363--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@sftim
Copy link
Contributor

sftim commented Aug 5, 2024

/retitle Document kernel version requirements for Linux

/sig architecture node

@k8s-ci-robot k8s-ci-robot added sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/node Categorizes an issue or PR as relevant to SIG Node. labels Aug 5, 2024
@k8s-ci-robot k8s-ci-robot changed the title Kernel version requirements Document kernel version requirements for Linux Aug 5, 2024
Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

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

Thanks

Let's make it clear this page is about Linux (and not Windows, which also has a kernel).

Comment on lines 26 to 50
[`nftables` proxy mode](/docs/reference/networking/virtual-ips/#proxy-mode-nftables) is introduced in v1.29.
The (alpha) nftables mode of kube-proxy now requires version 1.0.1 or later
of the nft command-line, and kernel 5.13 or later. (For testing/development
purposes, you can use older kernels, as far back as 5.4, if you set the
`nftables.skipKernelVersionCheck` option in the kube-proxy config, but this is not
recommended in production since it may cause problems with other nftables
users on the system.
Copy link
Contributor

Choose a reason for hiding this comment

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

This will become stale with the v1.31 release. Can we write it to be more neutral as to whether nftables support is alpha / beta / stable?

Copy link
Member Author

@pacoxu pacoxu Aug 6, 2024

Choose a reason for hiding this comment

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

Removed the alpha description here and only mentioned that the kernel version requirement.

@pacoxu pacoxu force-pushed the kernel-version-requirements branch from cd6a79a to 26ac83b Compare August 6, 2024 02:08

Many features rely on specific kernel functionalities and have minimum kernel version requirements.

## Pod sysctls {#requirements-pod-sysctl}
Copy link
Member

Choose a reason for hiding this comment

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

Would be great to have comment in this page pointing back to the constants in kubelet for each of the mentioned limitations. This way maintaining this page will be easier long term

<!--
Code: link to the constant in k/k
-->

Copy link
Member Author

Choose a reason for hiding this comment

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

19a4a01 Added some code reference.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need to customize the anchor ID for the subsection line.

@pacoxu pacoxu force-pushed the kernel-version-requirements branch from 26ac83b to 19a4a01 Compare August 6, 2024 06:38
Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

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

/hold

We can't / wouldn't make a statement about v1.31 prior to its release (see https://kubernetes.io/docs/contribute/style/style-guide/#avoid-statements-about-the-future - there are no obvious grounds for an exception).

This PR could target v1.31, or we can omit the detail about Kubernetes specifically recommending cgroup v2 (moving cgroup v1 support to maintenance only).

@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 Aug 6, 2024
@rphillips
Copy link
Member

The Kubelet and other low level components need to test the running the kernel if a feature is enabled. Can you add a blurb to this document? Kernel Vendors (RHEL, Debian, etc) often backport features and so going by kernel version number is not adequate for certain OS distributions.

@pacoxu pacoxu force-pushed the kernel-version-requirements branch 2 times, most recently from 43b85fe to 55ff16c Compare August 7, 2024 02:40
@pacoxu
Copy link
Member Author

pacoxu commented Aug 7, 2024

@sftim yes, this may hold until 1.31 release.

The Kubelet and other low level components need to test the running the kernel if a feature is enabled. Can you add a blurb to this document? Kernel Vendors (RHEL, Debian, etc) often backport features and so going by kernel version number is not adequate for certain OS distributions.

Added. Not sure if this is proper.

However, relying solely on kernel version numbers may not be sufficient
for certain operating system distributions,
as kernel vendors such as RHEL, Ubuntu and SUSE often backport features to older kernels.

Copy link
Member

@SergeyKanzhelev SergeyKanzhelev left a comment

Choose a reason for hiding this comment

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

lgtm, there is one link change recommendation that would be nice to apply

Copy link
Member

@SergeyKanzhelev SergeyKanzhelev 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 Aug 20, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 1fce3e5070dcf18c9ef89ced1df9ff1f13fbe241


Many features rely on specific kernel functionalities and have minimum kernel version requirements.

## Pod sysctls {#requirements-pod-sysctl}
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need to customize the anchor ID for the subsection line.

@pacoxu pacoxu force-pushed the kernel-version-requirements branch from ee8b09d to cb3a8de Compare August 26, 2024 05:30
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 26, 2024
@pacoxu pacoxu force-pushed the kernel-version-requirements branch from cb3a8de to af8df3a Compare August 26, 2024 06:01
@tengqm
Copy link
Contributor

tengqm commented Aug 26, 2024

/lgtm

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

LGTM label has been added.

Git tree hash: ea31a50cbf632d377bc5f8682c83b323e044be4e

@sftim
Copy link
Contributor

sftim commented Aug 27, 2024

v1.31 has been released
/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 Aug 27, 2024
Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

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

Let's ship this, even with the tiny snag.

/approve

Many features rely on specific kernel functionalities and have minimum kernel version requirements.
However, relying solely on kernel version numbers may not be sufficient
for certain operating system distributions,
as maintainers for distributions such as RHEL, Ubuntu and SUSE often backport selected features
Copy link
Contributor

Choose a reason for hiding this comment

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

@pacoxu we should list these vendors in alphabetical order. Willing to send in a follow up PR?

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SergeyKanzhelev, sftim

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 Aug 27, 2024
@k8s-ci-robot k8s-ci-robot merged commit 4f41986 into kubernetes:main Aug 27, 2024
6 checks passed
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. language/en Issues or PRs related to English language lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/node Categorizes an issue or PR as relevant to SIG Node. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Development

Successfully merging this pull request may close these issues.

6 participants