使用 Terraform 将 azurerm_application_gateway 与 AKS 集成

integrate azurerm_application_gateway with AKS with terraform

我能够使用高级网络创建 aks 集群。也能够将应用程序负载均衡器与此 AKS 集群集成,但我无法找到任何方法将 azure api 网关与 aks 集成。

将应用程序网关用作 AKS 的 Ingress 控制器目前处于测试状态(如 Github 页面所示 - https://github.com/Azure/application-gateway-kubernetes-ingress),因此我认为不会有在正式发布之前对使用 Terraform 进行设置的任何支持。

您可以使用 exec 资源做一些事情来设置它,但这将由您自己决定。

不幸的是,似乎没有办法将应用程序负载均衡器直接与 AKS 群集集成。您可以看到可以为 AKS here.

设置的所有内容

但是当您了解 AKS internal load balancer and Application gateway backend pool addresses. You can take a look at the steps that how to integrate application gateway with AKS cluster 时,您可以将应用程序负载均衡器与 AKS 集群集成。

首先需要对AKS集群网络进行规划,在Terraform中为应用网关后端池地址取一个准确的IP地址。希望对你有所帮助,有什么问题可以给我留言。