Skip to content

Commit

Permalink
fix: kubelet failed when enabling kubeReserved or systemReserved
Browse files Browse the repository at this point in the history
  • Loading branch information
gjmzj committed Jun 24, 2023
1 parent 104cba1 commit 69da335
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions roles/kube-node/templates/kubelet-config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions roles/kube-node/templates/kubelet.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 69da335

Please sign in to comment.