【发布时间】:2021-12-27 14:18:54
【问题描述】:
我有一个简单的 Spring Boot 应用程序,它使用帐户密钥连接到 Azure 存储帐户并检查 blob 是否存在。存储帐户受“网络”选项卡中的“选定网络”保护。
将我的本地客户端 IP 添加到存储帐户的防火墙白名单后,该应用在我的本地运行良好。
在 Azure Kubernetes 服务中部署此 Spring Boot 应用程序后,我在 blob.exists() 收到以下异常,即使在存储帐户的防火墙中将 Kubernetes 服务 IP 列入白名单。
com.microsoft.azure.storage.StorageException: This request is not authorized to perform this operation.
at com.microsoft.azure.storage.StorageException.translateException(StorageException.java:87)
at com.microsoft.azure.storage.core.StorageRequest.materializeException(StorageRequest.java:305)
at com.microsoft.azure.storage.core.ExecutionEngine.executeWithRetry(ExecutionEngine.java:196)
at com.microsoft.azure.storage.blob.CloudBlob.exists(CloudBlob.java:2073)
at com.microsoft.azure.storage.blob.CloudBlob.exists(CloudBlob.java:2060)
at com.microsoft.azure.storage.blob.CloudBlob.exists(CloudBlob.java:2035)
我确认了我的 Kubernetes 传出 IP this way
我通过多个存储帐户确认此错误。如果我在 AKS 设置或其他地方遗漏任何内容,请告诉我。感谢您的帮助。
【问题讨论】:
标签: azure kubernetes azure-storage-account azure-aks