kubesphere / kubekey

Install Kubernetes/K3s only, both Kubernetes/K3s and KubeSphere, and related cloud-native add-ons, it supports all-in-one, multi-node, and HA 🔥 ⎈ 🐳
https://kubesphere.io
Apache License 2.0
2.37k stars 550 forks source link

Supports to setup Kernel parameters with default values by kk #1017

Open RolandMa1986 opened 2 years ago

RolandMa1986 commented 2 years ago

Your current KubeKey version

No response

Describe this feature

Control-Panel and Worker nodes optimization is one of the critical works when deploying Kubernetes Clusters. Many of the pre-config kernel parameters are not optimized for the Kubernetes environment. Currently, there are already a few kernel parameters that were settled by KK, like: https://github.com/kubesphere/kubekey/blob/2518ff7da4ef38e49207fc228e59913186c7efee/pkg/bootstrap/os/templates/init_script.go#L68 So why not provide a more flexible solution for admins!

Describe the solution you'd like

Details:

  1. Find out the most valuable kernel parameter that needs to be configured.
  2. Provide a recommended built-in value that is suitable for most users.
  3. Allows admin users to override those values in the KK configuration.

Some of the Kernel parameters can be found in: https://github.com/kubernetes/kops/blob/master/nodeup/pkg/model/sysctls.go

Additional information

No response

24sama commented 2 years ago

Thanks for your suggestion and solution.