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/