In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to configure Kubelet Node Allocatable". Friends who are interested might as well take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to configure Kubelet Node Allocatable.
Kubelet Node Allocatable
Kubelet Node Allocatable is used to reserve resources for Kube components and System processes to ensure that Kube and System processes have sufficient resources when the node is at full load.
Currently, cpu, memory and ephemeral-storage resource reservations are supported.
Node Capacity is all the hardware resources of Node, kube-reserved is the resource reserved for kube components, system-reserved is the resource reserved for System process, eviction-threshold is the threshold setting of kubelet eviction, and allocatable is the reference value for real scheduler to schedule Pod (ensure that the request resource of all Pods on Node does not exceed Allocatable).
Node Allocatable Resource = Node Capacity-Kube-reserved-system-reserved-eviction-threshold
How to configure
-- enforce-node-allocatable, default is pods. To reserve resources for kube components and System processes, you need to set it to pods,kube-reserved,system-reserve.
-- cgroups-per-qos,Enabling QoS and Pod level cgroups is enabled by default. When enabled, kubelet will manage the cgroups of all workload Pods.
-- cgroup-driver. Default is cgroupfs, and another option is systemd. It depends on that the cgroup driver,kubelet used by the container is consistent with it. For example, if you configure docker to use systemd cgroup driver, then kubelet also needs to be configured-- cgroup-driver=systemd.
-- kube-reserved, used to configure the amount of resources reserved for kube components (kubelet,kube-proxy,dockerd, etc.), such as-kube-reserved=cpu=1000m,memory=8Gi,ephemeral-storage=16Gi.
-- kube-reserved-cgroup, if you set-- kube-reserved, then be sure to set the corresponding cgroup, and the cgroup directory must be created in advance, otherwise kubelet will not be automatically created and kubelet startup will not fail. For example, set it to kube-reserved-cgroup=/kubelet.service.
-- system-reserved, which is used to configure the amount of resources reserved for System processes, such as-system-reserved=cpu=500m,memory=4Gi,ephemeral-storage=4Gi.
-- system-reserved-cgroup, if you set-- system-reserved, then be sure to set the corresponding cgroup, and the cgroup directory must be created in advance, otherwise kubelet will not be automatically created and kubelet startup will not fail. For example, set it to system-reserved-cgroup=/system.slice.
-- eviction-hard, which is used to configure the hard eviction condition of kubelet. Only memory and ephemeral-storage incompressible resources are supported. When MemoryPressure appears, Scheduler does not dispatch new Best-Effort QoS Pods to this node. When a DiskPressure appears, Scheduler does not dispatch any new Pods to this node. For more interpretation of Kubelet Eviction, please refer to my related blog post.
Kubelet Node Allocatable code is very simple, mainly in pkg/kubelet/cm/node_container_manager.go, interested students go to read it.
For information on how to plan the Cgroup structure of Node, please refer to the official suggestion: recommended-cgroups-setup
Sample
Take the following kubelet resource reservation as an example. Node Capacity is memory=32Gi, cpu=16, and ephemeral-storage=100Gi. We configure kubelet as follows:
-- enforce-node-allocatable=pods,kube-reserved,system-reserved--kube-reserved-cgroup=/kubelet.service--system-reserved-cgroup=/system.slice--kube-reserved=cpu=1,memory=2Gi,ephemeral-storage=1Gi--system-reserved=cpu=500m,memory=1Gi,ephemeral-storage=1Gi--eviction-hard=memory.available
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.