Skip to content

Commit

Permalink
Graduate BlockVolume feature to beta (#10100)
Browse files Browse the repository at this point in the history
  • Loading branch information
wongma7 authored and k8s-ci-robot committed Dec 1, 2018
1 parent ed0e702 commit 055a566
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 29 deletions.
33 changes: 7 additions & 26 deletions content/en/docs/concepts/storage/persistent-volumes.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,12 @@ Currently, storage size is the only resource that can be set or requested. Futu
### Volume Mode

{{< feature-state for_k8s_version="v1.9" state="alpha" >}}
{{< feature-state for_k8s_version="v1.13" state="beta" >}}

To enable this feature, enable the `BlockVolume` feature gate on the apiserver, controller-manager and the kubelet.
The `BlockVolume` feature gate is enabled by default as of v1.13 on the apiserver, controller-manager and kubelet.

Prior to Kubernetes 1.9, all volume plugins created a filesystem on the persistent volume.
Now, you can set the value of `volumeMode` to `raw` to use a raw block device, or `filesystem`
Now, you can set the value of `volumeMode` to `block` to use a raw block device, or `filesystem`
to use a filesystem. `filesystem` is the default if the value is omitted. This is an optional API
parameter.

Expand Down Expand Up @@ -541,9 +542,9 @@ spec:
## Raw Block Volume Support

{{< feature-state for_k8s_version="v1.9" state="alpha" >}}
{{< feature-state for_k8s_version="v1.13" state="beta" >}}

To enable support for raw block volumes, enable the `BlockVolume` feature gate on the
apiserver, controller-manager and the kubelet.
The `BlockVolume` feature gate is enabled by default as of v1.13 on the apiserver, controller-manager and kubelet.

The following volume plugins support raw block volumes, including dynamic provisioning where
applicable.
Expand All @@ -562,6 +563,8 @@ applicable.
Support for the additional plugins was added in 1.10.
{{< /note >}}

`PersistentVolumeClaims` can only be bound to `PersistentVolumes` with the same `volumeMode.`

### Persistent Volumes using a Raw Block Volume
```yaml
apiVersion: v1
Expand Down Expand Up @@ -619,28 +622,6 @@ spec:
**Note:** When adding a raw block device for a Pod, we specify the device path in the container instead of a mount path.
{{< /note >}}

### Binding Block Volumes

If a user requests a raw block volume by indicating this using the `volumeMode` field in the `PersistentVolumeClaim` spec, the binding rules differ slightly from previous releases that didn't consider this mode as part of the spec.
Listed is a table of possible combinations the user and admin might specify for requesting a raw block device. The table indicates if the volume will be bound or not given the combinations:
Volume binding matrix for statically provisioned volumes:

| PV volumeMode | PVC volumeMode | Result |
| --------------|:---------------:| ----------------:|
| unspecified | unspecified | BIND |
| unspecified | Block | NO BIND |
| unspecified | Filesystem | BIND |
| Block | unspecified | NO BIND |
| Block | Block | BIND |
| Block | Filesystem | NO BIND |
| Filesystem | Filesystem | BIND |
| Filesystem | Block | NO BIND |
| Filesystem | unspecified | BIND |

{{< note >}}
**Note:** Only statically provisioned volumes are supported for alpha release. Administrators should take care to consider these values when working with raw block devices.
{{< /note >}}

## Volume Snapshot and Restore Volume from Snapshot Support

{{< feature-state for_k8s_version="v1.12" state="alpha" >}}
Expand Down
4 changes: 1 addition & 3 deletions content/en/docs/concepts/storage/volumes.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,6 @@ metadata:
spec:
capacity:
storage: 100Gi
# volumeMode field requires BlockVolume Alpha feature gate to be enabled.
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
Expand All @@ -594,8 +593,7 @@ the Kubernetes scheduler to correctly schedule Pods using local volumes to the
correct node.

PersistentVolume `volumeMode` can now be set to "Block" (instead of the default
value "Filesystem") to expose the local volume as a raw block device. The
`volumeMode` field requires `BlockVolume` Alpha feature gate to be enabled.
value "Filesystem") to expose the local volume as a raw block device.

When using local volumes, it is recommended to create a StorageClass with
`volumeBindingMode` set to `WaitForFirstConsumer`. See the
Expand Down

0 comments on commit 055a566

Please sign in to comment.