gpt4 book ai didi

azure-container-instances - 公共(public) DNS 名称

转载 作者:行者123 更新时间:2023-12-02 00:37:29 25 4
gpt4 key购买 nike

根据以下链接,我应该会看到带有我的 ACI 容器的公共(public) DNS 名称: https://feedback.azure.com/forums/602224-azure-container-instances/suggestions/32983720-automatically-assign-dns-name-to-instance

但是,没有创建 DNS 名称。以下是我创建容器的方式:

az container create -g ex-rg --name ex-container --image docker.io/repo/example:latest -e somevar=value --ip-address public --location westus

az container show --resource-group ex-rg --name ex-container |grep ip
"ipAddress": {
"ip": "40.112.219.202",
az container show --resource-group ex-rg --name ex-container |grep dns
"dnsNameLabel": null,```
az --version 
azure-cli (2.0.27)

我也尝试过使用 terraform(它使用 API),结果相同。

如果我们不能使用 DNS 名称,ACI 对我们就没有用。

最佳答案

您需要从 CLI 指定 dns-name-label 参数才能接收一个。这document可以提供帮助,下面显示了一个示例 - 当然要记住您的 DNS 名称需要是唯一的。

az container create -g MyResourceGroup --name myalpine --image alpine:latest --ports 80 443 --dns-name-label contoso

关于azure-container-instances - 公共(public) DNS 名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48808657/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com