docs: update local-storage.md

Add an explicit example of kubelet config.

Signed-off-by: Rémi Paulmier <remi.paulmier@gmail.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
This commit is contained in:
Rémi Paulmier 2024-11-27 00:03:04 +01:00 committed by Andrey Smirnov
parent 7e19d5c4c7
commit 9adaf7f012
No known key found for this signature in database
GPG Key ID: FE042E3D4085A811
2 changed files with 32 additions and 0 deletions

View File

@ -81,3 +81,19 @@ There are three patches applied:
* change default `/opt/local-path-provisioner` path to `/var/local-path-provisioner`
* make `local-path` storage class the default storage class (optional)
* label the `local-path-storage` namespace as privileged to allow privileged pods to be scheduled there
As for the `hostPath` mounts (see above), this will require the `kubelet` to bind mount the node's folder you chose (eg: `/var/local-path-provisioner`).
Otherwise, you'll have erratic behavior, especially when using the `subPath` statement in a `volumeMount`, which may lead to data loss and/or data never freed after PV deletion.
```yaml
machine:
kubelet:
extraMounts:
- destination: /var/local-path-provisioner
type: bind
source: /var/local-path-provisioner
options:
- bind
- rshared
- rw
```

View File

@ -81,3 +81,19 @@ There are three patches applied:
* change default `/opt/local-path-provisioner` path to `/var/local-path-provisioner`
* make `local-path` storage class the default storage class (optional)
* label the `local-path-storage` namespace as privileged to allow privileged pods to be scheduled there
As for the `hostPath` mounts (see above), this will require the `kubelet` to bind mount the node's folder you chose (eg: `/var/local-path-provisioner`).
Otherwise, you'll have erratic behavior, especially when using the `subPath` statement in a `volumeMount`, which may lead to data loss and/or data never freed after PV deletion.
```yaml
machine:
kubelet:
extraMounts:
- destination: /var/local-path-provisioner
type: bind
source: /var/local-path-provisioner
options:
- bind
- rshared
- rw
```