0
votes

Friends, any idea on how to mount Azure file share using SAS signature in a container. I was able to mount Azure file share using Storage Account name and Storage account Key but wasn't able to do using SAS token.

If you guys come across this kind of requirement, please free to share your suggestions.

Tried with below command to create secret:

kubectl create secret generic dev-fileshare-sas --from-literal=accountname=######### --from-literal sasToken="########" --type="azure/blobfuse"

volumes mount conf in container:

   - name: azurefileshare
     flexVolume:
       driver: "azure/blobfuse"
       readOnly: false
       secretRef:
         name: dev-fileshare-sas
       options:
         container: test-file-share
         mountoptions: "--file-cache-timeout-in-seconds=120"

Thanks.

1

1 Answers

0
votes

To mount a file share, you must use SMB. SMB supports mounting the file share using Identity based authentication (AD DS and AAD DS) or storage account key (not SAS). SAS key can only be used when accessing the file share using REST (for example, Storage Explorer).

This is covered in the FAQ: Frequently asked questions (FAQ) for Azure Files | Microsoft Docs