fix: kubelet failed when enabling kubeReserved or systemReserved

pull/1292/head
gjmzj 2023-06-24 12:10:43 +08:00
parent 104cba1875
commit 69da3353a1
2 changed files with 6 additions and 4 deletions

View File

@ -54,8 +54,8 @@ imageMinimumGCAge: 2m0s
{% if KUBE_RESERVED_ENABLED == "yes" %}
kubeReservedCgroup: /podruntime.slice
kubeReserved:
cpu: 200m
memory: 400Mi
cpu: 500m
memory: 1000Mi
pid: "1000"
{% endif %}
kubeAPIBurst: 100
@ -80,8 +80,8 @@ syncFrequency: 1m0s
{% if SYS_RESERVED_ENABLED == "yes" %}
systemReservedCgroup: /system.slice
systemReserved:
cpu: 200m
memory: 500Mi
cpu: 500m
memory: 1000Mi
pid: "5000"
{% endif %}
tlsCertFile: {{ ca_dir }}/kubelet.pem

View File

@ -22,6 +22,8 @@ ExecStartPre=/bin/mkdir -p /sys/fs/cgroup/systemd/system.slice
ExecStartPre=/bin/mkdir -p /sys/fs/cgroup/hugetlb/podruntime.slice
ExecStartPre=/bin/mkdir -p /sys/fs/cgroup/hugetlb/system.slice
ExecStartPre=/bin/mkdir -p /sys/fs/cgroup/podruntime.slice
{% endif %}
ExecStart={{ bin_dir }}/kubelet \
--config=/var/lib/kubelet/config.yaml \