From 2a1f525d413b1bcf68af35482e5f090307ee8070 Mon Sep 17 00:00:00 2001 From: Matthew Wong Date: Tue, 20 Nov 2018 11:48:44 -0500 Subject: [PATCH] Graduate BlockVolume feature to beta --- .../concepts/storage/persistent-volumes.md | 33 ++++--------------- content/en/docs/concepts/storage/volumes.md | 4 +-- .../feature-gates.md | 3 +- 3 files changed, 10 insertions(+), 30 deletions(-) diff --git a/content/en/docs/concepts/storage/persistent-volumes.md b/content/en/docs/concepts/storage/persistent-volumes.md index 28fc8b4f1a1ef..8bcef9a8c5b90 100644 --- a/content/en/docs/concepts/storage/persistent-volumes.md +++ b/content/en/docs/concepts/storage/persistent-volumes.md @@ -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. @@ -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. @@ -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 @@ -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" >}} diff --git a/content/en/docs/concepts/storage/volumes.md b/content/en/docs/concepts/storage/volumes.md index 5f16c2b464a57..78322046bf9d4 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 diff --git a/content/en/docs/reference/command-line-tools-reference/feature-gates.md b/content/en/docs/reference/command-line-tools-reference/feature-gates.md index fb7868ae5a152..cd58f6dc658b2 100644 --- a/content/en/docs/reference/command-line-tools-reference/feature-gates.md +++ b/content/en/docs/reference/command-line-tools-reference/feature-gates.md @@ -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 |