gpt4 book ai didi

以容器实例作为后端目标的 Azure 应用程序网关后端

转载 作者:行者123 更新时间:2023-12-02 23:52:59 26 4
gpt4 key购买 nike

将 Azure 应用程序网关后端目标配置为 Azure 容器实例是否有任何更改?目前,我将容器的私有(private) IP 地址配置为目标。问题在于,在容器的每次部署中,容器本身的 IP 地址都可能会发生变化。我正在寻找动态解决方案,例如容器上的标签。

以下是可用选项:

enter image description here

可以使用 Azure 应用程序网关进行存档还是我必须选择其他选项?

我尝试使用 IP 地址配置后端,但每次部署时 IP 地址都会发生变化。

最佳答案

Azure 应用程序 Gatwey 后端,以容器实例作为后端目标。确保在Standard V2 SKU

上配置应用程序网关

如果后端服务器具有内部可解析的 FQDN 或私有(private) IP 地址,则使用应用程序网关的实例私有(private) IP 地址将请求路由到后端服务器。在后端池中,确认 FQDN 可以在内部解析。

我创建了与标准 SKU 具有相同虚拟网络和层的应用程序网关,如下所示:

enter image description here

enter image description here

如果您希望容器在专用网络中运行并可以通过容器实例中的应用程序网关进行访问,我同意@silent,使用具有不同子网的相同虚拟网络,如下所示:

enter image description here

确保在 DNS 区域中添加容器的私有(private) IP 地址,如下所示:

enter image description here

使用特定域名的主机名覆盖启用后端设置,如下所示:

enter image description here

添加如下监听器

enter image description here

enter image description here

引用文献:

Azure Container Instances in VNET with custom DNS - by AzToso.com

Deploy container group to Azure virtual network - Azure Container Instances | Microsoft Learn

关于以容器实例作为后端目标的 Azure 应用程序网关后端,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76089764/

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