diff --git a/docs/cli/server.md b/docs/cli/server.md index e02c1040f..dee1c71e1 100644 --- a/docs/cli/server.md +++ b/docs/cli/server.md @@ -131,9 +131,9 @@ The following options must be set to the same value on all servers in the cluste ### Storage Class -| Flag | Description | -| ------------------------------------ | -------------------------------------------------------------- | -| `--default-local-storage-path` value | Default local storage path for local provisioner storage class | +| Flag | Default | Description | +| ------------------------------------ | ------------------------------ | -------------------------------------------------------------- | +| `--default-local-storage-path` value | `/var/lib/rancher/k3s/storage` | Default local storage path for local provisioner storage class | ### Kubernetes Components diff --git a/docs/storage/storage.md b/docs/storage/storage.md index 111a1ac54..b30ae29ec 100644 --- a/docs/storage/storage.md +++ b/docs/storage/storage.md @@ -30,7 +30,11 @@ Both components have out-of-tree alternatives that can be used with K3s: The Kub Kubernetes maintainers are actively migrating in-tree volume plugins to CSI drivers. For more information on this migration, please refer [here](https://kubernetes.io/blog/2021/12/10/storage-in-tree-to-csi-migration-status-update/). ## Setting up the Local Storage Provider -K3s comes with Rancher's Local Path Provisioner and this enables the ability to create persistent volume claims out of the box using local storage on the respective node. Below we cover a simple example. For more information please reference the official documentation [here](https://github.com/rancher/local-path-provisioner/blob/master/README.md#usage). +K3s comes with Rancher's Local Path Provisioner, which provides the ability to use Persistent Volume Claims using local storage on the respective node. Note that because the Persistent Volumes are bound to local paths on the node, pods using these PVs will not be able to reschedule to other nodes, should the node hosting the volume become unavailable. + +Included below is a sample pod using a PV and PVC. For more details on the usage of the Local Path Provisioner please reference the [official documentation](https://github.com/rancher/local-path-provisioner/blob/master/README.md#usage). + +K3s allows for overriding the path used on nodes via `--default-local-storage-path` (see the [Server CLI options](../cli/server.md) for more details including defaults), and further changes to Local Path Provisioner can be made via overriding the provided ConfigMap using [HelmChartConfig](../helm/helm#customizing-packaged-components-with-helmchartconfig). The contents of this ConfigMap is detailed [here](https://github.com/rancher/local-path-provisioner/blob/master/README.md#configuration) Create a hostPath backed persistent volume claim and a pod to utilize it: