fix: #1281 kebelet failed when systemReserved was enabled

pull/1292/head
gjmzj 2023-06-10 21:18:19 +08:00
parent 36af7dd7ed
commit 9150e54352
3 changed files with 4 additions and 3 deletions

View File

@ -26,6 +26,7 @@ clusterDomain: {{ CLUSTER_DNS_DOMAIN }}
configMapAndSecretChangeDetectionStrategy: Watch configMapAndSecretChangeDetectionStrategy: Watch
containerLogMaxFiles: 3 containerLogMaxFiles: 3
containerLogMaxSize: 10Mi containerLogMaxSize: 10Mi
containerRuntimeEndpoint: "unix:///run/containerd/containerd.sock"
enforceNodeAllocatable: enforceNodeAllocatable:
- pods - pods
{% if KUBE_RESERVED_ENABLED == "yes" %} {% if KUBE_RESERVED_ENABLED == "yes" %}
@ -56,7 +57,7 @@ kubeReservedCgroup: /podruntime.slice
kubeReserved: kubeReserved:
cpu: 200m cpu: 200m
memory: 400Mi memory: 400Mi
pid: 1000 pid: "1000"
{% endif %} {% endif %}
kubeAPIBurst: 100 kubeAPIBurst: 100
kubeAPIQPS: 50 kubeAPIQPS: 50
@ -82,7 +83,7 @@ systemReservedCgroup: /system.slice
systemReserved: systemReserved:
cpu: 200m cpu: 200m
memory: 500Mi memory: 500Mi
pid: 5000 pid: "5000"
{% endif %} {% endif %}
tlsCertFile: {{ ca_dir }}/kubelet.pem tlsCertFile: {{ ca_dir }}/kubelet.pem
tlsPrivateKeyFile: {{ ca_dir }}/kubelet-key.pem tlsPrivateKeyFile: {{ ca_dir }}/kubelet-key.pem

View File

@ -25,7 +25,6 @@ ExecStartPre=/bin/mkdir -p /sys/fs/cgroup/hugetlb/system.slice
{% endif %} {% endif %}
ExecStart={{ bin_dir }}/kubelet \ ExecStart={{ bin_dir }}/kubelet \
--config=/var/lib/kubelet/config.yaml \ --config=/var/lib/kubelet/config.yaml \
--container-runtime-endpoint=unix:///run/containerd/containerd.sock \
--hostname-override={{ K8S_NODENAME }} \ --hostname-override={{ K8S_NODENAME }} \
--kubeconfig=/etc/kubernetes/kubelet.kubeconfig \ --kubeconfig=/etc/kubernetes/kubelet.kubeconfig \
--root-dir={{ KUBELET_ROOT_DIR }} \ --root-dir={{ KUBELET_ROOT_DIR }} \

View File

@ -10,6 +10,7 @@ node=""
nodefaultctx=0 nodefaultctx=0
nodefaultns=0 nodefaultns=0
cmd='[ "nsenter", "--target", "1", "--mount", "--uts", "--ipc", "--net", "--pid", "--"' cmd='[ "nsenter", "--target", "1", "--mount", "--uts", "--ipc", "--net", "--pid", "--"'
# If this has a terminal for STDIN
if [ -t 0 ]; then if [ -t 0 ]; then
tty=true tty=true
else else