Yaml configuration to mount Azure Blob Container share Yaml configuration to mount Azure Blob Container share kubernetes kubernetes

Yaml configuration to mount Azure Blob Container share


After the responses I got from the above post and also went through the articles online, I see there is no option for Azure Blob to mount on Azure AKS except to use azcopy or rest api integration for my problem considering the limitations I have on my environment.

So, after little bit research and taking references from below articles I could able to create a Docker image.

1.) Created the docker image with the reference article. But again, I also need support to run a bash script as I am running azcopy command using bash file. So, I tried to copy the azcopy tool to /usr/bin.

2.) Created SAS tokens for Azure File Share & Azure Blob. (Make sure you give required access permissions only)

3.) Created a bash file that runs the below command.

azcopy <FileShareSASTokenConnectionUrl> <BlobSASTokenConnectionUrl> --recursive=true

4.) Created a deployment yaml that runs on AKS. Added the command to run bash file in that.

This gave me the ability to copy the files from Azure File Share Folders to Azure Blob Container

References:

1.) https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10?toc=%2fazure%2fstorage%2fblobs%2ftoc.json#obtain-a-static-download-link

2.) https://github.com/Azure/azure-storage-azcopy/issues/423