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" %} {% if KUBE_RESERVED_ENABLED == "yes" %}
kubeReservedCgroup: /podruntime.slice kubeReservedCgroup: /podruntime.slice
kubeReserved: kubeReserved:
cpu: 200m cpu: 500m
memory: 400Mi memory: 1000Mi
pid: "1000" pid: "1000"
{% endif %} {% endif %}
kubeAPIBurst: 100 kubeAPIBurst: 100
@ -80,8 +80,8 @@ syncFrequency: 1m0s
{% if SYS_RESERVED_ENABLED == "yes" %} {% if SYS_RESERVED_ENABLED == "yes" %}
systemReservedCgroup: /system.slice systemReservedCgroup: /system.slice
systemReserved: systemReserved:
cpu: 200m cpu: 500m
memory: 500Mi memory: 1000Mi
pid: "5000" pid: "5000"
{% endif %} {% endif %}
tlsCertFile: {{ ca_dir }}/kubelet.pem 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/podruntime.slice
ExecStartPre=/bin/mkdir -p /sys/fs/cgroup/hugetlb/system.slice ExecStartPre=/bin/mkdir -p /sys/fs/cgroup/hugetlb/system.slice
ExecStartPre=/bin/mkdir -p /sys/fs/cgroup/podruntime.slice
{% endif %} {% endif %}
ExecStart={{ bin_dir }}/kubelet \ ExecStart={{ bin_dir }}/kubelet \
--config=/var/lib/kubelet/config.yaml \ --config=/var/lib/kubelet/config.yaml \