用于安装Azure Blob容器共享的Yaml配置

问题描述 投票:0回答:1

如何在Yaml上配置Azure Blob存储容器

   - name: scripts-file-share
     azureFile:
         secretName: dev-blobstorage-secret
         shareName: logs
         readOnly: false```

The above is for the logs file share to configure on yaml.
But if I need to mount blob container? How to configure it?

Instead of azureFile do I need to use azureBlob?
And what is the configuration that I need to have below azureBlob? Please help

azure kubernetes yaml azure-storage-blobs
1个回答
0
投票
我从上述帖子中获得了答复,并且也在线阅读了文章,但我发现,考虑到我的限制,除了使用azcopy或rest api集成来解决我的问题之外,没有将Azure Blob安装到Azure AKS的选项。我的环境。

因此,经过一些研究并从下面的文章中获取了参考,我可以创建一个Docker映像。

1。)使用参考文章创建了docker镜像。但是同样,当我使用bash文件运行azcopy命令时,我还需要运行bash脚本的支持。因此,我尝试将azcopy工具复制到/ usr / bin。

2。)为Azure文件共享和Azure Blob创建SAS令牌。 (确保仅授予所需的访问权限)

3。)创建了一个运行以下命令的bash文件。

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

4。)创建了一个在AKS上运行的部署Yaml。在其中添加了运行bash文件的命令。

这使我能够将文件从Azure文件共享文件夹复制到Azure Blob容器

参考:

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

© www.soinside.com 2019 - 2024. All rights reserved.