mirror of https://github.com/easzlab/kubeasz.git
Add system-reserved in kubelet
parent
bc5fdd0898
commit
d4d98ee8ba
|
@ -14,9 +14,10 @@ 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%"
|
||||
|
||||
# node 请求 apiserver 负载均衡算法,常见如下:
|
||||
# "roundrobin": 基于服务器权重的轮询
|
||||
|
|
|
@ -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