diff --git a/mkdocs/docs/concepts/volumes.md b/mkdocs/docs/concepts/volumes.md index da0c0254c..19be81952 100644 --- a/mkdocs/docs/concepts/volumes.md +++ b/mkdocs/docs/concepts/volumes.md @@ -43,13 +43,17 @@ size: 100GB If you use this configuration, `dstack` will create a new volume based on the specified options. ??? info "Kubernetes" - With the `kubernetes` backend, you don't have to specify `region`, but you can optionally specify `storage_class_name` and/or `access_modes`: + Set `region` to a kubeconfig context name enabled in the [backend configuration](backends.md#kubernetes). + Omit it only for legacy configurations without `contexts`. + + You can optionally specify `storage_class_name` and/or `access_modes`:
```yaml type: volume backend: kubernetes + region: gpu-cluster-a name: my-volume size: 100GB @@ -110,13 +114,14 @@ If you register an existing volume, you must ensure the volume already has a fil ??? info "Kubernetes" - With the `kubernetes` backend, to reuse an existing `PersistentVolumeClaim`, specify its name in `claim_name`: + To reuse an existing `PersistentVolumeClaim`, specify `claim_name` and `region`.
```yaml type: volume backend: kubernetes + region: gpu-cluster-a name: my-volume claim_name: existing-pvc diff --git a/mkdocs/docs/reference/dstack.yml/volume.md b/mkdocs/docs/reference/dstack.yml/volume.md index d3f851c8c..23eccccd1 100644 --- a/mkdocs/docs/reference/dstack.yml/volume.md +++ b/mkdocs/docs/reference/dstack.yml/volume.md @@ -30,11 +30,14 @@ The `volume` configuration type allows creating, registering, and updating [volu Kubernetes backend volumes are mapped to [`PersistentVolumeClaim`](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) objects. + With `contexts` configured in the [backend](../../concepts/backends.md#kubernetes), set `region` to a kubeconfig context name. + To create a new claim, specify `size` and optionally `storage_class_name` and/or `access_modes`: ```yaml type: volume backend: kubernetes + region: gpu-cluster-a name: new-volume size: 100GB # By default, storage_class_name is not set, and the decision is delegated to @@ -51,6 +54,7 @@ The `volume` configuration type allows creating, registering, and updating [volu ```yaml type: volume backend: kubernetes + region: gpu-cluster-a name: existing-volume claim_name: existing-pvc ```