From 9027049f2ce5972777def0f6e7b663449ebc1f24 Mon Sep 17 00:00:00 2001 From: Masashi Honma Date: Fri, 2 Feb 2024 09:36:57 +0900 Subject: [PATCH] local-up-cluster.sh: Use config file instead of flags for kubelet Because /tmp/kubelet.log shows trailing log. Flag --container-runtime-endpoint has been deprecated, This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information. Signed-off-by: Masashi Honma --- hack/local-up-cluster.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index 60c1a7ff929..bf3ce3cd391 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -822,10 +822,6 @@ function start_kubelet { fi mkdir -p "/var/lib/kubelet" &>/dev/null || sudo mkdir -p "/var/lib/kubelet" - container_runtime_endpoint_args=() - if [[ -n "${CONTAINER_RUNTIME_ENDPOINT}" ]]; then - container_runtime_endpoint_args=("--container-runtime-endpoint=${CONTAINER_RUNTIME_ENDPOINT}") - fi image_service_endpoint_args=() if [[ -n "${IMAGE_SERVICE_ENDPOINT}" ]]; then @@ -840,7 +836,6 @@ function start_kubelet { "${cloud_config_arg[@]}" "--bootstrap-kubeconfig=${CERT_DIR}/kubelet.kubeconfig" "--kubeconfig=${CERT_DIR}/kubelet-rotated.kubeconfig" - ${container_runtime_endpoint_args[@]+"${container_runtime_endpoint_args[@]}"} ${image_service_endpoint_args[@]+"${image_service_endpoint_args[@]}"} ${KUBELET_FLAGS} ) @@ -864,6 +859,7 @@ address: "${KUBELET_HOST}" cgroupDriver: "${CGROUP_DRIVER}" cgroupRoot: "${CGROUP_ROOT}" cgroupsPerQOS: ${CGROUPS_PER_QOS} +containerRuntimeEndpoint: ${CONTAINER_RUNTIME_ENDPOINT} cpuCFSQuota: ${CPU_CFS_QUOTA} enableControllerAttachDetach: ${ENABLE_CONTROLLER_ATTACH_DETACH} localStorageCapacityIsolation: ${LOCAL_STORAGE_CAPACITY_ISOLATION}