Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
750 views
in Technique[技术] by (71.8m points)

containers - Need Azure Files shares to be mounted using SAS signatures

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...