Skip to content

Commit d41abff

Browse files
Merge pull request #5578 from juanluisvaladas/document-kubelet-root-dir
Document --kubelet-root-dir flag
2 parents 59250a1 + 1140f38 commit d41abff

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/configuration.md

+19
Original file line numberDiff line numberDiff line change
@@ -584,3 +584,22 @@ spec:
584584

585585
As seen from the component list, the only always-on component is the Kubernetes
586586
api-server, without that k0s serves no purpose.
587+
588+
## Kubelet root directory
589+
590+
Unlike vanilla kubernetes, k0s by default deploys kubelet's root directory inside
591+
`--data-dir`, which defaults to `/var/lib/k0s/` and kubelet ultimately runs in
592+
`/var/lib/k0s/kubelet`. This can result in incompatibilities on external software
593+
that mounts the kubelet working dir, such as CSI plugins.
594+
595+
This can be changed using the flag `--kubelet-root-dir`, for instance, to use
596+
kubernetes' default value it can be set up as:
597+
598+
```shell
599+
sudo k0s install worker --token-file /var/lib/k0s/join-token --kubelet-root-dir=/var/lib/kubelet
600+
```
601+
602+
Keep in mind that changing the flag in an existing node will not remove existing directories.
603+
Equally importantly, some pods such as CSI plugins are likely to mount this directory,
604+
having inconsistent values across nodes is very likely to cause problems on Deployments and
605+
DaemonSets.

0 commit comments

Comments
 (0)