From c3de25c782308d3253150515bb88a0c37f141a86 Mon Sep 17 00:00:00 2001 From: Max Gautier Date: Wed, 18 Sep 2024 02:34:45 +0200 Subject: [PATCH] Move the CRI endpoint setting to kubelet config (#11550) The `--container-runtime-endpoint` kubelet argument is deprecated in favor of the config file alternative. --- roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2 | 1 + roles/kubernetes/node/templates/kubelet.env.v1beta1.j2 | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2 b/roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2 index 870383c041b..325cc2fa11e 100644 --- a/roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2 +++ b/roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2 @@ -26,6 +26,7 @@ staticPodPath: {{ kube_manifest_dir }} cgroupDriver: {{ kubelet_cgroup_driver | default('systemd') }} containerLogMaxFiles: {{ kubelet_logfiles_max_nr }} containerLogMaxSize: {{ kubelet_logfiles_max_size }} +containerRuntimeEndpoint : {{ cri_socket }} maxPods: {{ kubelet_max_pods }} podPidsLimit: {{ kubelet_pod_pids_limit }} address: {{ kubelet_bind_address }} diff --git a/roles/kubernetes/node/templates/kubelet.env.v1beta1.j2 b/roles/kubernetes/node/templates/kubelet.env.v1beta1.j2 index a5aa369df57..643194bf193 100644 --- a/roles/kubernetes/node/templates/kubelet.env.v1beta1.j2 +++ b/roles/kubernetes/node/templates/kubelet.env.v1beta1.j2 @@ -11,7 +11,6 @@ KUBELET_HOSTNAME="--hostname-override={{ kube_override_hostname }}" --config={{ kube_config_dir }}/kubelet-config.yaml \ --kubeconfig={{ kube_config_dir }}/kubelet.conf \ {# end kubeadm specific settings #} ---container-runtime-endpoint={{ cri_socket }} \ --runtime-cgroups={{ kubelet_runtime_cgroups }} \ {% endset %}