@@ -125,8 +125,7 @@ You can use a dedicated user-assigned managed identity to mount the storage.
125
125
kubectl create -f https://raw.githubusercontent.com/kubernetes-sigs/blob-csi-driver/master/deploy/example/storageclass-blobfuse.yaml
126
126
` ` `
127
127
128
- 1. Create a ` pv-blobfuse-csi-mount.yaml` file and set clientID for ` ` AzureStorageIdentityClientID` ` . \
129
- Please also check ` ` resourceGroup` ` and ` ` storageAccount` ` .
128
+ 1. Create PV and set clientID for ` ` AzureStorageIdentityClientID` ` . Please also check ` ` resourceGroup` ` and ` ` storageAccount` ` .
130
129
` ` ` yml
131
130
apiVersion: v1
132
131
kind: PersistentVolume
@@ -157,13 +156,6 @@ You can use a dedicated user-assigned managed identity to mount the storage.
157
156
AzureStorageIdentityClientID: " xxxxx-xxxx-xxx-xxx-xxxxxxx"
158
157
` ` `
159
158
160
- 1. Create PV
161
- ` ` ` console
162
- kubectl create -f pv-blobfuse-csi-mount.yaml
163
- # check it
164
- kubectl get pv
165
- ` ` `
166
-
167
159
1. Create PVC and a deployment with volume mount
168
160
` ` ` console
169
161
kubectl create -f https://raw.githubusercontent.com/kubernetes-sigs/blob-csi-driver/master/deploy/example/deployment.yaml
@@ -194,20 +186,25 @@ You can use a dedicated user-assigned managed identity to mount the storage.
194
186
az identity list -g -g " $resourcegroup " --query " [?name == 'myaksblobmi2'].principalId" -o tsv
195
187
` ` `
196
188
197
- 1. Create a ` ` volume2.yaml` ` file and set objectID for ` ` AzureStorageIdentityClientID` ` . \
189
+ 1. Create storage class
190
+ ` ` ` console
191
+ kubectl create -f https://raw.githubusercontent.com/kubernetes-sigs/blob-csi-driver/master/deploy/example/storageclass-blobfuse.yaml
192
+ ` ` `
193
+
194
+ 1. Create PV and set objectID for ` ` AzureStorageIdentityClientID` ` . \
198
195
Please also check ` ` resourceGroup` ` and ` ` storageAccount` ` .
199
196
` ` ` yml
200
197
apiVersion: v1
201
198
kind: PersistentVolume
202
199
metadata:
203
- name: pv-blob2
200
+ name: pv-blob
204
201
spec:
205
202
capacity:
206
203
storage: 10Gi
207
204
accessModes:
208
205
- ReadWriteMany
209
206
persistentVolumeReclaimPolicy: Retain # If set as "Delete" container would be removed after pvc deletion
210
- storageClassName: azureblob -fuse-premium
207
+ storageClassName: blob -fuse
211
208
mountOptions:
212
209
- -o allow_other
213
210
- --file-cache-timeout-in-seconds=120
@@ -216,38 +213,21 @@ You can use a dedicated user-assigned managed identity to mount the storage.
216
213
readOnly: false
217
214
# make sure this volumeid is unique in the cluster
218
215
# `#` is not allowed in self defined volumeHandle
219
- volumeHandle: pv-blob2
216
+ volumeHandle: pv-blob
220
217
volumeAttributes:
221
218
protocol: fuse
222
219
resourceGroup: blobfuse-mi
223
220
storageAccount: myaksblob
224
221
containerName: mycontainer
225
222
AzureStorageAuthType: MSI
226
223
AzureStorageIdentityClientID: " xxxxx-xxxx-xxx-xxx-xxxxxxx"
227
-
228
- ---
229
-
230
- apiVersion: v1
231
- kind: PersistentVolumeClaim
232
- metadata:
233
- name: pvc-blob2
234
- spec:
235
- accessModes:
236
- - ReadWriteMany
237
- resources:
238
- requests:
239
- storage: 10Gi
240
- volumeName: pv-blob2
241
- storageClassName: azureblob-fuse-premium
242
224
` ` `
243
225
244
- 1. Apply the ` ` volume2.yaml` ` file
245
- ` ` ` bash
246
- # create pv and pvc
247
- kubectl apply -f volume2.yaml
248
- # check it
249
- kubectl get pv
250
- kubectl get pvc
226
+ 1. Create PVC
227
+ ` ` ` console
228
+ kubectl create -f https://raw.githubusercontent.com/kubernetes-sigs/blob-csi-driver/master/deploy/example/pvc-blob-csi-static.yaml
229
+ # make sure pvc is created and in Bound status after a while
230
+ kubectl describe pvc pvc-blob
251
231
` ` `
252
232
253
- 1. Now you can use the persistent volume claim ` ` pv-blob2 ` ` in another deployment.
233
+ 1. Now you can use the persistent volume claim ` ` pv-blob ` ` in another deployment.
0 commit comments