You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The v1.29 release of Kubernetes introduced an alpha feature to support modifying a volume
11
-
by changing VolumeAttributesClassName that was assigned to a PersistentVolumeClaim (PVC).
11
+
by changing the `volumeAttributesClassName`that was specified for a PersistentVolumeClaim (PVC).
12
12
With the feature enabled, Kubernetes can handle updates of volume attributes other than capacity.
13
13
Allowing volume attributes to be changed without managing it through different
14
14
provider's APIs directly simplifies the current flow.
@@ -54,114 +54,112 @@ in the `kube-controller-manager` and the `kube-apiserver`. Use the `--feature-ga
54
54
It also requires that the CSI driver has implemented the ModifyVolume API.
55
55
56
56
57
-
### User Flow
57
+
### User flow
58
58
59
59
If you would like to see the feature in action and verify it works fine in your cluster, here's what you can try:
60
60
61
61
62
62
1. Define a StorageClass and VolumeAttributesClass
63
63
64
-
```yaml
65
-
apiVersion: storage.k8s.io/v1
66
-
kind: StorageClass
67
-
metadata:
68
-
name: csi-sc-example
69
-
provisioner: pd.csi.storage.gke.io
70
-
parameters:
71
-
disk-type: "hyperdisk-balanced"
72
-
volumeBindingMode: WaitForFirstConsumer
73
-
```
74
-
75
-
76
-
77
-
```yaml
78
-
apiVersion: storage.k8s.io/v1alpha1
79
-
kind: VolumeAttributesClass
80
-
metadata:
81
-
name: silver
82
-
driverName: pd.csi.storage.gke.io
83
-
parameters:
84
-
provisioned-iops: "3000"
85
-
provisioned-throughput: "50"
86
-
```
64
+
```yaml
65
+
apiVersion: storage.k8s.io/v1
66
+
kind: StorageClass
67
+
metadata:
68
+
name: csi-sc-example
69
+
provisioner: pd.csi.storage.gke.io
70
+
parameters:
71
+
disk-type: "hyperdisk-balanced"
72
+
volumeBindingMode: WaitForFirstConsumer
73
+
```
74
+
75
+
76
+
```yaml
77
+
apiVersion: storage.k8s.io/v1alpha1
78
+
kind: VolumeAttributesClass
79
+
metadata:
80
+
name: silver
81
+
driverName: pd.csi.storage.gke.io
82
+
parameters:
83
+
provisioned-iops: "3000"
84
+
provisioned-throughput: "50"
85
+
```
87
86
88
87
89
88
2. Define and create the PersistentVolumeClaim
90
89
91
-
```yaml
92
-
apiVersion: v1
93
-
kind: PersistentVolumeClaim
94
-
metadata:
95
-
name: test-pv-claim
96
-
spec:
97
-
storageClassName: csi-sc-example
98
-
volumeAttributesClassName: silver
99
-
accessModes:
100
-
- ReadWriteOnce
101
-
resources:
102
-
requests:
103
-
storage: 64Gi
104
-
```
90
+
```yaml
91
+
apiVersion: v1
92
+
kind: PersistentVolumeClaim
93
+
metadata:
94
+
name: test-pv-claim
95
+
spec:
96
+
storageClassName: csi-sc-example
97
+
volumeAttributesClassName: silver
98
+
accessModes:
99
+
- ReadWriteOnce
100
+
resources:
101
+
requests:
102
+
storage: 64Gi
103
+
```
105
104
106
105
107
106
3. Verify that the PersistentVolumeClaim is now provisioned correctly with:
108
107
109
-
```yaml
110
-
kubectl get pvc
111
-
```
108
+
```
109
+
kubectl get pvc
110
+
```
112
111
113
112
114
113
4. Create a new VolumeAttributesClass gold:
115
114
116
-
```yaml
117
-
apiVersion: storage.k8s.io/v1alpha1
118
-
kind: VolumeAttributesClass
119
-
metadata:
120
-
name: gold
121
-
driverName: pd.csi.storage.gke.io
122
-
parameters:
123
-
iops: "4000"
124
-
throughput: "60"
125
-
```
115
+
```yaml
116
+
apiVersion: storage.k8s.io/v1alpha1
117
+
kind: VolumeAttributesClass
118
+
metadata:
119
+
name: gold
120
+
driverName: pd.csi.storage.gke.io
121
+
parameters:
122
+
iops: "4000"
123
+
throughput: "60"
124
+
```
126
125
127
126
128
127
5. Update the PVC with the new VolumeAttributesClass and apply:
129
128
130
-
```yaml
131
-
apiVersion: v1
132
-
kind: PersistentVolumeClaim
133
-
metadata:
134
-
name: test-pv-claim
135
-
spec:
136
-
storageClassName: csi-sc-example
137
-
volumeAttributesClassName: gold
138
-
accessModes:
139
-
- ReadWriteOnce
140
-
resources:
141
-
requests:
142
-
storage: 64Gi
143
-
144
-
```
129
+
```yaml
130
+
apiVersion: v1
131
+
kind: PersistentVolumeClaim
132
+
metadata:
133
+
name: test-pv-claim
134
+
spec:
135
+
storageClassName: csi-sc-example
136
+
volumeAttributesClassName: gold
137
+
accessModes:
138
+
- ReadWriteOnce
139
+
resources:
140
+
requests:
141
+
storage: 64Gi
142
+
```
145
143
146
144
147
145
6. Verify that PersistentVolumeClaims has the updated VolumeAttributesClass parameters with:
148
146
149
-
```yaml
150
-
kubectl describe pvc <PVC_NAME>
151
-
```
147
+
```
148
+
kubectl describe pvc <PVC_NAME>
149
+
```
152
150
153
151
## Next steps
154
152
155
153
* See the [VolumeAttributesClass KEP](https://kep.k8s.io/3751) for more information on the design
156
154
* You can view or comment on the [project board](https://github.com/orgs/kubernetes-csi/projects/72) for VolumeAttributesClass
157
155
* In order to move this feature towards beta, we need feedback from the community,
158
-
so here's a call to action: add support to the CSI drivers, try out this feature,
159
-
consider how it can help with problems that your users are having…
156
+
so here's a call to action: add support to the CSI drivers, try out this feature,
157
+
consider how it can help with problems that your users are having…
160
158
161
159
162
160
## Getting involved
163
161
164
-
We always welcome new contributors. So, if you would like to get involved, you can join our [Kubernetes Storage Special-Interest-Group](https://github.com/kubernetes/community/tree/master/sig-storage) (SIG).
162
+
We always welcome new contributors. So, if you would like to get involved, you can join our [Kubernetes Storage SpecialInterestGroup](https://github.com/kubernetes/community/tree/master/sig-storage) (SIG).
165
163
166
164
If you would like to share feedback, you can do so on our [public Slack channel](https://app.slack.com/client/T09NY5SBT/C09QZFCE5).
0 commit comments