【问题标题】:DnsNameLabelNotSupported - VSTS ARM Template for Azure Container InstancesDnsNameLabelNotSupported - Azure 容器实例的 VSTS ARM 模板
【发布时间】:2018-07-03 15:10:21
【问题描述】:

基本上在为我的 azure 容器实例的 arm 模板添加 "dnsNameLabel" 值后,我收到了以下消息:

2018-07-03T14:31:14.8518944Z ##[error]At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details.
2018-07-03T14:31:14.8571875Z ##[error]Details:
2018-07-03T14:31:14.8616789Z ##[error]BadRequest: {
  "error": {
    "code": "DnsNameLabelNotSupported",
    "message": "DNS name label for container group is not supported before version '2018-02-01-preview'."
  }
}

摘自 arm-template.json

...
            "osType": "[variables('osType')]",
            "ipAddress": {
                "type": "Public",
                "dnsNameLabel": "rabbitmq",
                "ports": [
                    {
                        "protocol": "tcp",
                        "port": "15672"
                    }
                ]
            },
...

附:我正在使用 VSTS 的 Azure 资源组部署任务进行部署。

【问题讨论】:

  • 代理名为 Hosted Linux Preview。我试图查找版本,但看不到任何用版本描述它的属性。
  • 是的,尝试使用最新的步骤版本,您是否使用资源组部署步骤进行部署?
  • 是的,我正在使用 Azure 资源组部署任务进行部署。并且选择了它的第 2 版,似乎是最新的。
  • 尝试 azure powershell task 最新版本并进行相同的部署

标签: azure-pipelines-build-task arm-template azure-container-registry azure-container-instances


【解决方案1】:

问题是由 arm 模板文件中的 "apiVersion" 键引起的。它必须更新以匹配更新版本的 api。导航到github arm templates repo 您可以看到哪个是最新版本。

将其更新到最新解决了问题。

另一个建议是使用 JSON 架构验证器来确保 .json 文件的内容与架构匹配。

【讨论】:

  • 既然你的问题已经解决了,就可以标记答案了。
  • Cristian 是正确的,DNS 名称标签需要更改 API 以支持新属性,因此您需要使用支持所述属性的 API 版本。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-02-11
  • 1970-01-01
相关资源
最近更新 更多