Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions content/en/docs/concepts/storage/volume-attributes-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ weight: 40
---
<!-- overview -->

{{< feature-state for_k8s_version="v1.29" state="alpha" >}}
{{< feature-state feature_gate_name="VolumeAttributesClass" >}}

This page assumes that you are familiar with [StorageClasses](/docs/concepts/storage/storage-classes/),
[volumes](/docs/concepts/storage/volumes/) and [PersistentVolumes](/docs/concepts/storage/persistent-volumes/)
Expand All @@ -18,17 +18,23 @@ in Kubernetes.

A VolumeAttributesClass provides a way for administrators to describe the mutable
"classes" of storage they offer. Different classes might map to different quality-of-service levels.
Kubernetes itself is unopinionated about what these classes represent.
Kubernetes itself is un-opinionated about what these classes represent.

This is an alpha feature and disabled by default.
This is a beta feature and disabled by default.

If you want to test the feature whilst it's alpha, you need to enable the `VolumeAttributesClass`
If you want to test the feature whilst it's beta, you need to enable the `VolumeAttributesClass`
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) for the kube-controller-manager and the kube-apiserver. You use the `--feature-gates` command line argument:

```
--feature-gates="...,VolumeAttributesClass=true"
```

You will also have to enable the `storage.k8s.io/v1beta1` API group through the `kube-apiserver` [runtime-config](https://kubernetes.io/docs/tasks/administer-cluster/enable-disable-api/). You use the following command line argument:

```
--runtime-config=storage.k8s.io/v1beta1=true
```

You can also only use VolumeAttributesClasses with storage backed by
{{< glossary_tooltip text="Container Storage Interface" term_id="csi" >}}, and only where the
relevant CSI driver implements the `ModifyVolume` API.
Expand All @@ -45,7 +51,7 @@ While the name of a VolumeAttributesClass object in a `PersistentVolumeClaim` is


```yaml
apiVersion: storage.k8s.io/v1alpha1
apiVersion: storage.k8s.io/v1beta1
kind: VolumeAttributesClass
metadata:
name: silver
Expand Down Expand Up @@ -74,7 +80,7 @@ Each VolumeAttributesClass has a resizer that determines what volume plugin is u

The modifying volume feature support for VolumeAttributesClass is implemented in [kubernetes-csi/external-resizer](https://github.com/kubernetes-csi/external-resizer).

For example, a existing PersistentVolumeClaim is using a VolumeAttributesClass named silver:
For example, an existing PersistentVolumeClaim is using a VolumeAttributesClass named silver:

```yaml
apiVersion: v1
Expand All @@ -91,7 +97,7 @@ A new VolumeAttributesClass gold is available in the cluster:


```yaml
apiVersion: storage.k8s.io/v1alpha1
apiVersion: storage.k8s.io/v1beta1
kind: VolumeAttributesClass
metadata:
name: gold
Expand Down Expand Up @@ -128,4 +134,4 @@ the parameters may be used depends on the CSI driver implementation.
Please refer to the related CSI driver documentation for more details.

There can be at most 512 parameters defined for a VolumeAttributesClass.
The total length of the parameters object including its keys and values cannot exceed 256 KiB.
The total length of the parameters object including its keys and values cannot exceed 256 KiB.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ _build:
render: false

stages:
- stage: alpha
- stage: alpha
defaultValue: false
fromVersion: "1.29"
toVersion: "1.30"
- stage: beta
defaultValue: false
fromVersion: "1.31"
---
Enable support for VolumeAttributesClasses.
See [Volume Attributes Classes](/docs/concepts/storage/volume-attributes-classes/)
Expand Down