azure - 如何使用 Azure CLI 将 Azure 容器实例部署到 VNET

标签 azure azure-container-instances

我需要使用 Azure CLI 部署具有 VNet 连接的 Azure 容器实例。 这是我正在使用的命令:

az container create -g My_RG --name ubuntu-aci-2 --image ubuntu --vnet /subscriptions/f2ees954-606e-4480-b05f-48c85c8c05cf/resourceGroups/My_RG/providers/Microsoft.Network/virtualNetworks/aci-vnet --subnet default

我收到以下错误:

Resource /subscriptions/f2ees954-606e-4480-b05f-48c85c8c05cf/resourceGroups/My_RG/providers/Microsoft.Network/virtualNetworks/ACI-VNET referenced by resource /subscriptions/f2ees954-606e-4480-b05f-48c85c8c05cf/resourceGroups/My_RG/providers/Microsoft.Network/networkProfiles/aci-network-profile-aci-vnet-default was not found. Please make sure that the referenced resource exists, and that both resources are in the same region

我做错了什么?

//编辑

在创建容器之前,VNET“aci-vnet”及其子域“default”已存在。

最佳答案

您应该将容器实例部署在与 Vnet 所在区域相同的区域中。

关于azure - 如何使用 Azure CLI 将 Azure 容器实例部署到 VNET,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61383415/

相关文章:

node.js - 错误: Socket Hang Up with Postman API testing

azure - 套接字异常 : An attempt was made to access a socket in a way forbidden by its access permissions

azure - Kusto 正则表达式查询电子邮件

Azure 自动化 : Runbook: Get all AAD Group Properties, 例如注释/信息字段?

azure - 使用 Terraform 创建 Ansible 库存

azure 逻辑应用程序: waiting for an ACI container to terminate to get its logs

azure - azure容器实例的私有(private)IP

重新部署时 Azure ACI 专用 IP 发生变化

azure - Http 请求失败,因为获取 AD OAuth token 时出错 : 'AADSTS50001: The application named https://management. azure.windows.net

azure - 无法通过浏览器访问Azure容器