Skip to content

Commit

Permalink
Graduate BlockVolume feature to beta
Browse files Browse the repository at this point in the history
  • Loading branch information
wongma7 committed Nov 21, 2018
1 parent dda97e2 commit 2a1f525
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 30 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 @@ -300,11 +300,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 @@ -531,9 +532,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 @@ -551,6 +552,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 @@ -608,28 +611,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
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ different Kubernetes components.
| `APIResponseCompression` | `false` | Alpha | 1.7 | |
| `AppArmor` | `true` | Beta | 1.4 | |
| `AttachVolumeLimit` | `true` | Alpha | 1.11 | |
| `BlockVolume` | `false` | Alpha | 1.9 | |
| `BlockVolume` | `false` | Alpha | 1.9 | 1.12 |
| `BlockVolume` | `true` | Beta | 1.13 | |
| `CPUManager` | `false` | Alpha | 1.8 | 1.9 |
| `CPUManager` | `true` | Beta | 1.10 | |
| `CRIContainerLogRotation` | `false` | Alpha | 1.10 | 1.10 |
Expand Down

0 comments on commit 2a1f525

Please sign in to comment.