[英]Azure container app cannot pull image from azure container registry which are present in different subscriptions
my scenario is like I have shared container registry in one subscription say subscription A, I need to pull image from ACR to ACA through DevOps pipelines.我的场景就像我在一个订阅中共享容器注册表,比如订阅 A,我需要通过 DevOps 管道将图像从 ACR 拉到 ACA。 The ACAs are present for each environment like dev, test, UAT & etc which is in another subscription say subscription B. I am using 'az containerapp up' command in azure devops pipelines to pull image of the shared ACR.
ACA 适用于每个环境,如开发、测试、UAT 等,它们在另一个订阅中,比如订阅 B。我在 azure devops 管道中使用“az containerapp up”命令来拉取共享 ACR 的图像。 Getting error 'The resource is not found in the subscription B'.
出现错误“在订阅 B 中找不到资源”。 What might be the alternative possible solution because we need to reduce cost of using container registry for each environment.
可能的替代解决方案是什么,因为我们需要降低为每个环境使用容器注册表的成本。 I am using service connections to pull image and the service connections are separate for separate subscriptions.
我正在使用服务连接来拉取图像,并且服务连接对于单独的订阅是分开的。
I know that they are in different subscriptions but I searched on websites to connect two different subscriptions.我知道他们在不同的订阅中,但我在网站上搜索以连接两个不同的订阅。 Is there a possibility that I can connect two different service connections in azure devops & use one service connection to pull that image.
我是否有可能在 azure devops 中连接两个不同的服务连接并使用一个服务连接来拉取该图像。
Before integrating the Azure CLI command az containerapp up
with Azure pipelines, please first confirm you are able to pull the ACR image from Sub B
to deploy the container app in Sub A
via CloudShell or LocalPowerShell .在将 Azure CLI 命令
az containerapp up
与 Azure 管道集成之前,请先确认您能够从Sub B
提取 ACR 映像,以通过CloudShell或LocalPowerShell在Sub A
中部署容器应用程序。
I tested to create ARM service connection with Tenant Root Management Group
whose referenced service principle had access to both subscriptions;我测试与
Tenant Root Management Group
创建 ARM 服务连接,其引用的服务原则可以访问两个订阅; the issue still existed.问题仍然存在。
In local PowerShell, I az login
with my user account and still could reproduce the issue.在本地 PowerShell 中,我使用我的用户帐户
az login
,仍然可以重现该问题。
az containerapp up `
--name XXcontainerapp `
--image XXacrsubB.azurecr.io/azurecontainerappdemo:XX `
--resource-group rg-containerapp `
--environment TestEnv `
--registry-username XXacrsubB `
--registry-password XXXXXX
It seemed to be a limitation with this command az containerapp up .这似乎是此命令az containerapp up的限制。 You may consider reporting the issue with Azure CLI.
您可以考虑使用 Azure CLI 报告问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.