Azure:通过 Terraform 为现有应用程序网关激活 AGIC 无法完全正常工作
如果我通过 Terraform 为现有应用程序网关激活 AKS 的 AGIC:
addon_profile {
ingress_application_gateway {
enabled = true
gateway_id = azurerm_application_gateway.application-gateway-network-1.id
}
}
并且部署 hello-world 入口应用程序,则不会自动创建现有应用程序网关中的规则等。如果我除了通过 Azure Portal 禁用 AGIC 并再次启用它之外什么都不做:一切正常!如果我部署相同的 hello-world 入口应用程序,则会自动创建规则/运行状况探测器等。 这似乎是 Terraform 或 Azure API 端的错误,但找不到任何内容。也许有人作为提示甚至解决方案?
我尝试使用不同的 AKS 版本并使用最新的 Terraform Azurem 提供程序 2.98。
提前致谢
if I activate AGIC for AKS via Terraform for an existing Application Gateway:
addon_profile {
ingress_application_gateway {
enabled = true
gateway_id = azurerm_application_gateway.application-gateway-network-1.id
}
}
and I deploy a hello-world ingress-application the rules etc. within the existing Application Gateway are not automatically created. If I change nothing but disabling AGIC via Azure Portal and enable it again: all works fine! Rules/health probes etc. are created automatically if I deploy the same hello-world ingress-application.
It seems to be a bug on Terraform or Azure API side but cannot find anything. maybe someone as a hint or even a solution?
I tried it with different AKS versions and use the latest Terraform Azurem provider 2.98.
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 azurerm 提供程序
>=3.0.0
,您需要将ingress_application_gateway
移至addon_profile
之外,因为不再支持该功能。传递
gateway_name
和subnet_cidr
而不是gateway_id
对我来说很有效,因为 Azure 创建入口并分配给 k8s 集群。这样就无需创建azurerm_application_gateway
资源。使用以下内容。
注意:相应地更改 gateway_name 和subnet_cidr 值。
Using azurerm provider
>=3.0.0
you'll need to move theingress_application_gateway
outside of theaddon_profile
as that's no longer supported.Passing the
gateway_name
and asubnet_cidr
instead of thegateway_id
works for me, as Azure create ingress and assigns to the k8s cluster. This saves the need to create anazurerm_application_gateway
resource.Use the following.
Note: change the gateway_name and subnet_cidr values accordingly.