Updates on the PV zone affinity documentation

Updates docs around the PV distribution process per the linked issues
This commit is contained in:
Justin Nauman 2016-12-28 14:54:52 -06:00 committed by Andrew Chen
parent b1dfb93e1b
commit 5e77cd1825
1 changed files with 10 additions and 7 deletions

View File

@ -51,7 +51,7 @@ admission controller automatically adds zone labels to them. The scheduler (via
`VolumeZonePredicate` predicate) will then ensure that pods that claim a `VolumeZonePredicate` predicate) will then ensure that pods that claim a
given volume are only placed into the same zone as that volume, as volumes given volume are only placed into the same zone as that volume, as volumes
cannot be attached across zones. cannot be attached across zones.
## Limitations ## Limitations
There are some important limitations of the multizone support: There are some important limitations of the multizone support:
@ -158,8 +158,7 @@ kubernetes-minion-wf8i Ready 2m beta.kubernetes.io
### Volume affinity ### Volume affinity
Create a volume (only PersistentVolumes are supported for zone Create a volume using the dynamic volume creation (only PersistentVolumes are supported for zone affinity):
affinity), using the new dynamic volume creation:
```json ```json
kubectl create -f - <<EOF kubectl create -f - <<EOF
@ -186,10 +185,14 @@ kubectl create -f - <<EOF
EOF EOF
``` ```
The PV is also labeled with the zone & region it was created in. For **NOTE:** For version 1.3+ Kubernetes will distribute dynamic PV claims across
version 1.2, dynamic persistent volumes are always created in the zone the configured zones. For version 1.2, dynamic persistent volumes were
of the cluster master (here us-central1-a / us-west-2a); this will always created in the zone of the cluster master
be improved in a future version (issue [#23330](https://github.com/kubernetes/kubernetes/issues/23330).) (here us-central1-a / us-west-2a); that issue
([#23330](https://github.com/kubernetes/kubernetes/issues/23330))
was addressed in 1.3+.
Now lets validate that Kubernetes automatically labeled the zone & region the PV was created in.
```shell ```shell
> kubectl get pv --show-labels > kubectl get pv --show-labels