Regional PD documentation; edited validation for Volumes page (#8714)

This commit is contained in:
Cheng Xing
2018-06-01 07:52:56 -07:00
committed by k8s-ci-robot
parent e49f288730
commit 3e1465461f
3 changed files with 76 additions and 23 deletions
+33 -1
View File
@@ -368,6 +368,38 @@ spec:
fsType: ext4
```
#### Regional Persistent Disks
{{< feature-state for_k8s_version="v1.10" state="beta" >}}
The [Regional Persistent Disks](https://cloud.google.com/compute/docs/disks/#repds) feature allows the creation of Persistent Disks that are available in two zones within the same region. In order to use this feature, the volume must be provisioned as a PersistentVolume; referencing the volume directly from a pod is not supported.
#### Manually provisioning a Regional PD PersistentVolume
Dynamic provisioning is possible using a [StorageClass for GCE PD](/docs/concepts/storage/storage-classes/#gce).
Before creating a PersistentVolume, you must create the PD:
```shell
gcloud beta compute disks create --size=500GB my-data-disk
--region us-central1
--replica-zones us-central1-a,us-central1-b
```
Example PersistentVolume spec:
```yaml
apiVersion: v1
kind: PersistentVolume
metadata:
name: test-volume
labels:
failure-domain.beta.kubernetes.io/zone: us-central1-a__us-central1-b
spec:
capacity:
storage: 400Gi
accessModes:
- ReadWriteOnce
gcePersistentDisk:
pdName: my-data-disk
fsType: ext4
```
### gitRepo
A `gitRepo` volume is an example of what can be done as a volume plugin. It
@@ -527,7 +559,7 @@ durability characteristics of the underlying disk.
The following is an example PersistentVolume spec using a `local` volume and
`nodeAffinity`:
``` yaml
```yaml
apiVersion: v1
kind: PersistentVolume
metadata: