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
@@ -15,15 +15,71 @@ You can also use a different managed-identity for different persistent volumes (
15
15
16
16
- Run `az account set --subscription "mysubscription"` to select the right subscription
17
17
18
-
- Create a storage account container, e.g.
18
+
- Create a storage account container(optional in dynamic provisioning), e.g.
19
19
```bash
20
20
resourcegroup="blobfuse-mi"
21
21
storageaccountname="myaksblob"
22
22
az storage account create -g "$resourcegroup" -n "$storageaccountname" --access-tier Hot --sku Standard_LRS
23
23
az storage container create -n mycontainer --account-name "$storageaccountname" --public-access off
24
24
```
25
+
26
+
## dynamic provisioning in an existing resource group
27
+
28
+
1. Grant cluster system assigned identity and kubelet identity `Contributor` role to resource group, if mount in an existing storage account, then should also grant identities to storage account
25
29
26
-
## Option#1: grant kubelet identity access to storage account
30
+
1. Grant kubelet identity `Storage Blob Data Owner` role to resource group to mount blob storage, if mount in an existing storage account, then should also grant identity to storage account
31
+
32
+
1. Create a storage class in an existing resource group
33
+
- Option#1 create storage account by CSI driver, will create a new storage account when `storageAccount` and `containerName` are not provided.
34
+
- Option#2 use your own storage account, set storage account name for`storageAccount`, you can also set an existing container name for`containerName`if you want to mount an existing container.
35
+
```yml
36
+
apiVersion: storage.k8s.io/v1
37
+
kind: StorageClass
38
+
metadata:
39
+
name: blob-fuse
40
+
provisioner: blob.csi.azure.com
41
+
parameters:
42
+
skuName: Premium_LRS
43
+
protocol: fuse
44
+
resourceGroup: EXISTING_RESOURCE_GROUP_NAME
45
+
storageAccount: EXISTING_STORAGE_ACCOUNT_NAME # optional, if use existing storage account
46
+
containerName: EXISTING_CONTAINER_NAME # optional, if use existing container
# dynamic provisioning in an existing resource group
172
-
173
-
1. Grant cluster system assigned identity and kubelet identity `Contributor` role to resource group, if mount in an existing storage account, then should also grant identity to storage account
174
-
175
-
1. Grant kubelet identity `Storage Blob Data Owner` role to resource group to mount blob storage, if mount in an existing storage account, then should also grant identity to storage account
176
-
177
-
1. Create a storage class and give an existing resource group, CSI will create a new storage account when `storageAccount` is not provided.
178
-
```yml
179
-
apiVersion: storage.k8s.io/v1
180
-
kind: StorageClass
181
-
metadata:
182
-
name: blob-fuse
183
-
provisioner: blob.csi.azure.com
184
-
parameters:
185
-
skuName: Premium_LRS
186
-
protocol: fuse
187
-
resourceGroup: EXISTING_RESOURCE_GROUP_NAME
188
-
storageAccount: EXISTING_STORAGE_ACCOUNT_NAME # optional, if use existing storage account
189
-
containerName: EXISTING_CONTAINER_NAME # optional, if use existing container
0 commit comments