From 69814a72daf93c4b8316a141f2fda613aae4226c Mon Sep 17 00:00:00 2001 From: Dmitry512TR <23633956+DmitryMihailov@users.noreply.github.com> Date: Wed, 30 Sep 2020 12:11:07 +0200 Subject: [PATCH] Update 17-extra-dynamic-kubelet-configuration.md Added reference link and also enhanced the instructions. --- docs/17-extra-dynamic-kubelet-configuration.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/17-extra-dynamic-kubelet-configuration.md b/docs/17-extra-dynamic-kubelet-configuration.md index 9ad9856..bccc52d 100644 --- a/docs/17-extra-dynamic-kubelet-configuration.md +++ b/docs/17-extra-dynamic-kubelet-configuration.md @@ -11,9 +11,18 @@ NODE_NAME="worker-1"; NODE_NAME="worker-1"; curl -sSL "https://localhost:6443/ap kubectl -n kube-system create configmap nodes-config --from-file=kubelet=kubelet_configz_${NODE_NAME} --append-hash -o yaml ``` -Edit node to use the dynamically created configuration +Edit `worker-1` node to use the dynamically created configuration ``` -kubectl edit worker-2 +master-1# kubectl edit node worker-1 +``` + +Add the following YAML bit under `spec`: +``` +configSource: + configMap: + name: CONFIG_MAP_NAME # replace CONFIG_MAP_NAME with the name of the ConfigMap + namespace: kube-system + kubeletConfigKey: kubelet ``` Configure Kubelet Service @@ -45,3 +54,5 @@ RestartSec=5 WantedBy=multi-user.target EOF ``` + +Reference: https://kubernetes.io/docs/tasks/administer-cluster/reconfigure-kubelet/