Skip to content

Commit e5599b9

Browse files
committed
placeholder PR for VAC beta
1 parent d4f93e3 commit e5599b9

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
layout: blog
3+
title: "Kubernetes 1.31: VolumeAttributesClass for Volume Modification Beta"
4+
date: XXXX-XX-XX
5+
slug: kubernetes-1-31-volume-attributes-class
6+
author: >
7+
Sunny Song (Google)
8+
Matthew Cary (Google)
9+
---
10+
11+
Volumes in Kubernetes have been described by two attributes: their storage class, and
12+
their capacity. The storage class is an immutable property of the volume, while the
13+
capacity can be changed dynamically with [volume
14+
resize](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims).
15+
16+
This complicates vertical scaling of workloads with volumes. While cloud providers and
17+
storage vendors often offer volumes which allow specifying IO quality of service
18+
(Performance) parameters like IOPS or throughput and tuning them as workloads operate,
19+
Kubernetes has no API which allows changing them.
20+
21+
We are pleased to announce that the [VolumeAttributesClass
22+
KEP](https://github.com/kubernetes/enhancements/blob/master/keps/sig-storage/3751-volume-attributes-class/README.md),
23+
alpha since Kubernetes 1.29, will be beta in 1.31. This provides a generic,
24+
Kubernetes-native API for modifying volume parameters like provisioned IO.
25+
26+
Like all new volume features in Kubernetes, this API is implemented via the [container
27+
storage interface (CSI)](https://kubernetes-csi.github.io/docs/). In addition to the
28+
VolumeAttributesClass feature gate, your provisioner-specific CSI driver must support the
29+
feature.
30+
31+
### Dynamically modifying volume attributes.
32+
33+
A `VolumeAttributesClass` is a cluster-scoped resource that specifies provisioner-specific
34+
attributes. These are created by the cluster administrator in the same way as storage
35+
classes. For example, a series of gold, silver and bronze volume attribute classes can be
36+
created for volumes with greater or lessor amounts of provisioned IO.
37+
38+
```yaml
39+
apiVersion: storage.k8s.io/v1alpha1
40+
kind: VolumeAttributesClass
41+
metadata:
42+
name: silver
43+
driverName: pd.csi.storage.gke.io
44+
parameters:
45+
iops: "500"
46+
throughput: "50MiB/s"
47+
```
48+
49+
An attribute class is added to a PVC in much the same way as a storage class.
50+
51+
```yaml
52+
apiVersion: v1
53+
kind: PersistentVolumeClaim
54+
metadata:
55+
name: test-pv-claim
56+
spec:
57+
storageClassName: csi-sc-example
58+
volumeAttributesClassName: silver
59+
accessModes:
60+
- ReadWriteOnce
61+
resources:
62+
requests:
63+
storage: 64Gi
64+
```
65+
66+
Unlike a storage class, the volume attributes class can be changed:
67+
68+
```
69+
kubectl patch pvc test-pv-claim -p '{"spec": "volumeAttributesClassName": "gold"}'
70+
```
71+
72+
Kubernetes will work with the provisioner CSI driver to update the attributes of the
73+
volume. The status of the PVC will track the current and desired attributes class. The PV
74+
resource has also been updated with a volume attributes class which will be set to the
75+
currently active attributes of the PV.
76+
77+
### Limitations with the beta
78+
79+
As a beta feature, there are still some features which are planned for GA but not yet
80+
present. The largest is quota support, see the
81+
[KEP](https://github.com/kubernetes/enhancements/blob/master/keps/sig-storage/3751-volume-attributes-class/README.md)
82+
and discussion in
83+
[sig-storage](https://github.com/kubernetes/community/tree/master/sig-storage) for details.

0 commit comments

Comments
 (0)