Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
947 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 Reply

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...