Add system-reserved in kubelet

pull/641/head
gjmzj 2019-06-12 21:31:06 +08:00
parent bc5fdd0898
commit d4d98ee8ba
2 changed files with 5 additions and 2 deletions

View File

@ -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": 基于服务器权重的轮询

View File

@ -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