-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Update docs with topology aware dynamic provisioning #9939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,6 +57,7 @@ parameters: | |
reclaimPolicy: Retain | ||
mountOptions: | ||
- debug | ||
volumeBindingMode: Immediate | ||
``` | ||
|
||
### Provisioner | ||
|
@@ -66,15 +67,15 @@ for provisioning PVs. This field must be specified. | |
|
||
| Volume Plugin | Internal Provisioner| Config Example | | ||
| :--- | :---: | :---: | | ||
| AWSElasticBlockStore | ✓ | [AWS](#aws) | | ||
| AWSElasticBlockStore | ✓ | [AWS EBS](#aws-ebs) | | ||
| AzureFile | ✓ | [Azure File](#azure-file) | | ||
| AzureDisk | ✓ | [Azure Disk](#azure-disk) | | ||
| CephFS | - | - | | ||
| Cinder | ✓ | [OpenStack Cinder](#openstack-cinder)| | ||
| FC | - | - | | ||
| FlexVolume | - | - | | ||
| Flocker | ✓ | - | | ||
| GCEPersistentDisk | ✓ | [GCE](#gce) | | ||
| GCEPersistentDisk | ✓ | [GCE PD](#gce-pd) | | ||
| Glusterfs | ✓ | [Glusterfs](#glusterfs) | | ||
| iSCSI | - | - | | ||
| Quobyte | ✓ | [Quobyte](#quobyte) | | ||
|
@@ -120,6 +121,74 @@ If the volume plugin does not support mount options but mount options are | |
specified, provisioning will fail. Mount options are not validated on either | ||
the class or PV, so mount of the PV will simply fail if one is invalid. | ||
|
||
### Volume Binding Mode | ||
|
||
{{< feature-state for_k8s_version="v1.12" state="beta" >}} | ||
|
||
**Note:** This feature requires the `VolumeScheduling` feature gate to be | ||
enabled. | ||
|
||
The `volumeBindingMode` field controls when [volume binding and dynamic | ||
provisioning](/docs/concepts/storage/persistent-volumes/#provisioning) should occur. | ||
|
||
By default, the `Immediate` mode indicates that volume binding and dynamic | ||
provisioning occurs once the PVC is created. For storage | ||
backends that are topology-constrained and not globally accessible from all Nodes | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will it be possible to keep the examples of common topology-constrained volume types [a zonal disk like EBS/GCE PD/Azure Managed disk or a local volume] as was specified earlier? It helps the reader understands where There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The list of supported plugins is below. Is that what you meant? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah yes, that should be good. |
||
in the cluster, Volumes will be bound or provisioned without knowledge of the Pod's scheduling | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Volumes => PVs |
||
requirements. This may result in unschedulable Pods. | ||
|
||
A cluster administrator can address this issue by specifying the `WaitForFirstConsumer` mode which | ||
will delay the binding and provisioning of a Volume until a Pod using the PVC is created. | ||
Volumes will be selected or provisioned conforming to the topology that is | ||
specified by the Pod's scheduling constraints. These include, but are not limited to, [resource | ||
requirements](/docs/concepts/configuration/manage-compute-resources-container), | ||
[node selectors](/docs/concepts/configuration/assign-pod-node/#nodeselector), | ||
[pod affinity and | ||
anti-affinity](/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity), | ||
and [taints and tolerations](/docs/concepts/configuration/taint-and-toleration). | ||
|
||
The following plugins support `WaitForFirstConsumer` with dynamic provisioning: | ||
|
||
* [AWSElasticBlockStore](#aws-ebs) | ||
* [GCEPersistentDisk](#gce-pd) | ||
* [AzureDisk](#azure-disk) | ||
|
||
The following plugins support `WaitForFirstConsumer` with pre-created PV binding: | ||
|
||
* All of the above | ||
* [Local](#local) | ||
|
||
### Allowed Topologies | ||
{{< feature-state for_k8s_version="v1.12" state="beta" >}} | ||
|
||
**Note:** This feature requires the `VolumeScheduling` feature gate to be | ||
enabled. | ||
|
||
When a cluster operactor specifies the `WaitForFirstConsumer` volume binding mode, it is no longer necessary | ||
to restrict provisioning to specific topologies in most situations. However, | ||
if still required, `allowedTopologies` can be specified. | ||
|
||
This example demonstrates how to restrict the topology of provisioned volumes to specific | ||
zones and should be used as a replacement for the `zone` and `zones` parameters for the | ||
supported plugins. | ||
|
||
```yaml | ||
kind: StorageClass | ||
apiVersion: storage.k8s.io/v1 | ||
metadata: | ||
name: standard | ||
provisioner: kubernetes.io/gce-pd | ||
parameters: | ||
type: pd-standard | ||
volumeBindingMode: WaitForFirstConsumer | ||
allowedTopologies: | ||
- matchLabelExpressions: | ||
- key: failure-domain.beta.kubernetes.io/zone | ||
values: | ||
- us-central1-a | ||
- us-cetnral1-b | ||
``` | ||
|
||
## Parameters | ||
|
||
Storage classes have parameters that describe volumes belonging to the storage | ||
|
@@ -128,7 +197,7 @@ class. Different parameters may be accepted depending on the `provisioner`. For | |
`iopsPerGB` are specific to EBS. When a parameter is omitted, some default is | ||
used. | ||
|
||
### AWS | ||
### AWS EBS | ||
|
||
```yaml | ||
kind: StorageClass | ||
|
@@ -138,17 +207,16 @@ metadata: | |
provisioner: kubernetes.io/aws-ebs | ||
parameters: | ||
type: io1 | ||
zones: us-east-1d, us-east-1c | ||
iopsPerGB: "10" | ||
``` | ||
|
||
* `type`: `io1`, `gp2`, `sc1`, `st1`. See | ||
[AWS docs](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) | ||
for details. Default: `gp2`. | ||
* `zone`: AWS zone. If neither `zone` nor `zones` is specified, volumes are | ||
* `zone` (Deprecated): AWS zone. If neither `zone` nor `zones` is specified, volumes are | ||
generally round-robin-ed across all active zones where Kubernetes cluster | ||
has a node. `zone` and `zones` parameters must not be used at the same time. | ||
* `zones`: A comma separated list of AWS zone(s). If neither `zone` nor `zones` | ||
* `zones` (Deprecated): A comma separated list of AWS zone(s). If neither `zone` nor `zones` | ||
is specified, volumes are generally round-robin-ed across all active zones | ||
where Kubernetes cluster has a node. `zone` and `zones` parameters must not | ||
be used at the same time. | ||
|
@@ -164,7 +232,10 @@ parameters: | |
encrypting the volume. If none is supplied but `encrypted` is true, a key is | ||
generated by AWS. See AWS docs for valid ARN value. | ||
|
||
### GCE | ||
**Note:** `zone` and `zones` parameters are deprecated and replaced with | ||
[allowedTopologies](#allowed-topologies) | ||
|
||
### GCE PD | ||
|
||
```yaml | ||
kind: StorageClass | ||
|
@@ -174,15 +245,14 @@ metadata: | |
provisioner: kubernetes.io/gce-pd | ||
parameters: | ||
type: pd-standard | ||
zones: us-central1-a, us-central1-b | ||
replication-type: none | ||
``` | ||
|
||
* `type`: `pd-standard` or `pd-ssd`. Default: `pd-standard` | ||
* `zone`: GCE zone. If neither `zone` nor `zones` is specified, volumes are | ||
* `zone` (Deprecated): GCE zone. If neither `zone` nor `zones` is specified, volumes are | ||
generally round-robin-ed across all active zones where Kubernetes cluster has | ||
a node. `zone` and `zones` parameters must not be used at the same time. | ||
* `zones`: A comma separated list of GCE zone(s). If neither `zone` nor `zones` | ||
* `zones` (Deprecated): A comma separated list of GCE zone(s). If neither `zone` nor `zones` | ||
is specified, volumes are generally round-robin-ed across all active zones | ||
where Kubernetes cluster has a node. `zone` and `zones` parameters must not | ||
be used at the same time. | ||
|
@@ -199,6 +269,9 @@ specified, Kubernetes will arbitrarily choose among the specified zones. If the | |
`zones` parameter is omitted, Kubernetes will arbitrarily choose among zones | ||
managed by the cluster. | ||
|
||
**Note:** `zone` and `zones` parameters are deprecated and replaced with | ||
[allowedTopologies](#allowed-topologies) | ||
|
||
### Glusterfs | ||
|
||
```yaml | ||
|
@@ -678,4 +751,4 @@ Delaying volume binding allows the scheduler to consider all of a pod's | |
scheduling constraints when choosing an appropriate PersistentVolume for a | ||
PersistentVolumeClaim. | ||
|
||
{{% /capture %}} | ||
{{% /capture %}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we indicate here that PVC == PersistentVolumeClaim?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't hurt to be explicit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PVC and PersistentVolumeClaim were introduced at the beginning of this page