Skip to content

Commit

Permalink
docs: update local-storage.md
Browse files Browse the repository at this point in the history
Add an explicit example of kubelet config.

Signed-off-by: Rémi Paulmier <[email protected]>
Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
shtouff authored and smira committed Nov 27, 2024
1 parent 7e19d5c commit 9adaf7f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

0 comments on commit 9adaf7f

Please sign in to comment.