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
Copy file name to clipboardExpand all lines: deploy/example/mountstorage/README.md
+47-3Lines changed: 47 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ You can also use a different managed-identity for different persistent volumes (
23
23
az storage container create -n mycontainer --account-name "$storageaccountname" --public-access off
24
24
```
25
25
26
-
## option#1: grant kubelet identity access to storage account
26
+
## Option#1: grant kubelet identity access to storage account
27
27
28
28
1. Give kubelet identity access to storage account
29
29
```bash
@@ -38,7 +38,7 @@ You can also use a different managed-identity for different persistent volumes (
38
38
az identity list -g "$resourcegroup" --query "[?name == 'aks-fuseblob-mi-agentpool'].clientId" -o tsv
39
39
```
40
40
41
-
## option#2: grant a dedicated user-assigned managed identity access to storage account
41
+
## Option#2: grant a dedicated user-assigned managed identity access to storage account
42
42
You can use a dedicated user-assigned managed identity to mount the storage.
43
43
44
44
1. Create user-assigned managed identity and give access to storage account
@@ -154,12 +154,56 @@ You can use a dedicated user-assigned managed identity to mount the storage.
154
154
kubectl get pv
155
155
kubectl get pvc
156
156
157
-
# create deployment and service
157
+
# create deployment
158
158
kubectl apply -f deployment.yaml
159
159
# check pod
160
160
kubectl get pods
161
161
```
162
162
163
+
# dynamic provisioning in an existing resource group
164
+
165
+
1. Grant cluster system assigned identity `Contributor` to resource group, if mount in an existing storage account, then should also grant identity to storage account
166
+
167
+
1. Grant kubelet identity `Storage Blob Data Owner` to resource group to mount blob storage, if mount in an existing storage account, then should also grant identity to storage account
168
+
169
+
1. Create a storage class and give an existing resource group, CSI will create a new storage account when `storageAccount` is not provided.
170
+
```yml
171
+
apiVersion: storage.k8s.io/v1
172
+
kind: StorageClass
173
+
metadata:
174
+
name: blob-fuse
175
+
provisioner: blob.csi.azure.com
176
+
parameters:
177
+
skuName: Premium_LRS
178
+
protocol: fuse
179
+
resourceGroup: EXISTING_RESOURCE_GROUP_NAME
180
+
storageAccount: EXISTING_STORAGE_ACCOUNT_NAME # optional, if use existing storage account
181
+
containerName: EXISTING_CONTAINER_NAME # optional, if use existing container
0 commit comments