简体   繁体   English

Azure 容器应用程序无法从存在于不同订阅中的 azure 容器注册表中提取图像

[英]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 映像,以通过CloudShellLocalPowerShellSub 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.问题仍然存在。

FailureWithTenantRootMG

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

本地 PowerShell 失败

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.

相关问题 无法从 Azure 容器注册表中提取映像 - Unable to pull image from Azure Container Registry 如何从Docker注册表中提取容器映像以部署Azure容器 - How to pull container image from docker registry to deploy azure container Azure Static WebApp 可以从 Azure Container Registry 拉取镜像吗? - Can Azure Static WebApp pull an image from Azure Container Registry? 无法从Azure容器注册表中提取图像-拒绝提取 - Can't pull image from Azure Container Registry - pull denied 在kubernetes helm中拉出azure容器注册表图像 - Pull azure container registry image in kubernetes helm 拉图像Azure容器注册表 - Kubernetes - Pull image Azure Container Registry - Kubernetes Azure Web App for Containers 中跨订阅的 Azure 容器注册表 - Azure Container Registry in Azure Web App for Containers across subscriptions WSL-无法登录或从Azure容器注册表中提取图像 - WSL - Can't login or pull image from an azure container registry 如何从现有的 azure 容器注册表中拉取镜像? - How to pull image from existing azure container registry? Azure Kube.netes 无法从 ACR 容器中拉取镜像 - Azure Kubernetes cannot pull a image from ACR container
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM