mirror of https://github.com/easzlab/kubeasz.git
Add system-reserved in kubelet
parent
d519f55056
commit
533aa7e9d0
|
@ -14,6 +14,7 @@ MAX_PODS: 110
|
|||
# 配置为kube组件(kubelet,kube-proxy,dockerd等)预留的资源量
|
||||
KUBE_RESERVED_ENABLED: "yes"
|
||||
KUBE_RESERVED: "cpu=200m,memory=500Mi,ephemeral-storage=1Gi"
|
||||
SYS_RESERVED: "cpu=200m,memory=500Mi,ephemeral-storage=1Gi"
|
||||
|
||||
# 配置kubelet的hard eviction条件
|
||||
HARD_EVICTION: "memory.available<200Mi,nodefs.available<10%"
|
||||
HARD_EVICTION: "memory.available<500Mi,nodefs.available<10%"
|
||||
|
|
|
@ -39,9 +39,11 @@ ExecStart={{ bin_dir }}/kubelet \
|
|||
--cgroups-per-qos=true \
|
||||
--cgroup-driver=cgroupfs \
|
||||
{% if KUBE_RESERVED_ENABLED == "yes" %}
|
||||
--enforce-node-allocatable=pods,kube-reserved \
|
||||
--enforce-node-allocatable=pods,kube-reserved,system-reserved \
|
||||
--kube-reserved={{ KUBE_RESERVED }} \
|
||||
--kube-reserved-cgroup=/system.slice/kubelet.service \
|
||||
--system-reserved={{ SYS_RESERVED }} \
|
||||
--system-reserved-cgroup=/system.slice \
|
||||
{% endif %}
|
||||
--eviction-hard={{ HARD_EVICTION }} \
|
||||
--v=2
|
||||
|
|
Loading…
Reference in New Issue