Skip to content

Commit df1fff8

Browse files
committed
fix
1 parent 6ea668d commit df1fff8

File tree

3 files changed

+17
-37
lines changed

3 files changed

+17
-37
lines changed

deploy/example/mountstorage/README.md renamed to deploy/example/blobfuse-mi/README.md

Lines changed: 16 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ You can use a dedicated user-assigned managed identity to mount the storage.
125125
kubectl create -f https://raw.githubusercontent.com/kubernetes-sigs/blob-csi-driver/master/deploy/example/storageclass-blobfuse.yaml
126126
```
127127

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``.
130129
```yml
131130
apiVersion: v1
132131
kind: PersistentVolume
@@ -157,13 +156,6 @@ You can use a dedicated user-assigned managed identity to mount the storage.
157156
AzureStorageIdentityClientID: "xxxxx-xxxx-xxx-xxx-xxxxxxx"
158157
```
159158
160-
1. Create PV
161-
```console
162-
kubectl create -f pv-blobfuse-csi-mount.yaml
163-
# check it
164-
kubectl get pv
165-
```
166-
167159
1. Create PVC and a deployment with volume mount
168160
```console
169161
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.
194186
az identity list -g -g "$resourcegroup" --query "[?name == 'myaksblobmi2'].principalId" -o tsv
195187
```
196188
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``. \
198195
Please also check ``resourceGroup`` and ``storageAccount``.
199196
```yml
200197
apiVersion: v1
201198
kind: PersistentVolume
202199
metadata:
203-
name: pv-blob2
200+
name: pv-blob
204201
spec:
205202
capacity:
206203
storage: 10Gi
207204
accessModes:
208205
- ReadWriteMany
209206
persistentVolumeReclaimPolicy: Retain # If set as "Delete" container would be removed after pvc deletion
210-
storageClassName: azureblob-fuse-premium
207+
storageClassName: blob-fuse
211208
mountOptions:
212209
- -o allow_other
213210
- --file-cache-timeout-in-seconds=120
@@ -216,38 +213,21 @@ You can use a dedicated user-assigned managed identity to mount the storage.
216213
readOnly: false
217214
# make sure this volumeid is unique in the cluster
218215
# `#` is not allowed in self defined volumeHandle
219-
volumeHandle: pv-blob2
216+
volumeHandle: pv-blob
220217
volumeAttributes:
221218
protocol: fuse
222219
resourceGroup: blobfuse-mi
223220
storageAccount: myaksblob
224221
containerName: mycontainer
225222
AzureStorageAuthType: MSI
226223
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
242224
```
243225
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
251231
```
252232
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.

deploy/example/mountstorage/storageclass-blobfuse-resourcegroup.yaml renamed to deploy/example/blobfuse-mi/storageclass-blobfuse-mi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ parameters:
1111
storageAccount: EXISTING_STORAGE_ACCOUNT_NAME # optional, if use existing storage account
1212
containerName: EXISTING_CONTAINER_NAME # optional, if use existing container
1313
AzureStorageAuthType: MSI
14-
AzureStorageIdentityClientID: "92926dfd-e61b-4730-85ab-5be73b374e82"
14+
AzureStorageIdentityClientID: "xxxxx-xxxx-xxx-xxx-xxxxxxx"
1515
reclaimPolicy: Delete
1616
volumeBindingMode: Immediate
1717
allowVolumeExpansion: true

0 commit comments

Comments
 (0)