mirror of
https://github.com/kelseyhightower/kubernetes-the-hard-way.git
synced 2025-08-08 20:02:42 +03:00
Merge pull request #181 from DmitryMihailov/patch-1
Update 17-extra-dynamic-kubelet-configuration.md with more descriptive instructions
This commit is contained in:
@@ -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
|
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
|
Configure Kubelet Service
|
||||||
@@ -45,3 +54,5 @@ RestartSec=5
|
|||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Reference: https://kubernetes.io/docs/tasks/administer-cluster/reconfigure-kubelet/
|
||||||
|
Reference in New Issue
Block a user