From 055a5667c92e14f5974b5b0f742b67ead82ef991 Mon Sep 17 00:00:00 2001 From: Matthew Wong Date: Sat, 1 Dec 2018 16:57:54 -0500 Subject: [PATCH] Graduate BlockVolume feature to beta (#10100) --- .../concepts/storage/persistent-volumes.md | 33 ++++--------------- content/en/docs/concepts/storage/volumes.md | 4 +-- 2 files changed, 8 insertions(+), 29 deletions(-) diff --git a/content/en/docs/concepts/storage/persistent-volumes.md b/content/en/docs/concepts/storage/persistent-volumes.md index 89e3e4b86f533..2a3c5a459f6f8 100644 --- a/content/en/docs/concepts/storage/persistent-volumes.md +++ b/content/en/docs/concepts/storage/persistent-volumes.md @@ -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. @@ -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. @@ -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 @@ -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" >}} diff --git a/content/en/docs/concepts/storage/volumes.md b/content/en/docs/concepts/storage/volumes.md index 2d8288ab8ec30..4fb904d845bb8 100644 --- a/content/en/docs/concepts/storage/volumes.md +++ b/content/en/docs/concepts/storage/volumes.md @@ -571,7 +571,6 @@ metadata: spec: capacity: storage: 100Gi - # volumeMode field requires BlockVolume Alpha feature gate to be enabled. volumeMode: Filesystem accessModes: - ReadWriteOnce @@ -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