来自带有 AKS 后端的 Azure FrontDoor 的 503 响应,其中需要主机 header

503 responses from Azure FrontDoor with AKS backend where host header is required

我们有一个 Azure FrontDoor (FD) 配置(后端池和 https 的路由设置),它为我们托管在 Azure Kubernetes 服务 (AKS) 容器中的站点返回 503。

我们有一个 Azure 前门配置为路由到托管在 AKS 中的后端。后端的地址为 https://application-eastus2-01.application.com. We have configured the host header to send as www.application.com。 IE。跟后台地址不一样

我们已将 AKS 设置为通过容器和入口为我们的网站提供服务,如果主机 header www.application.com is used. If i run curl and postman against this AKS ingress ip and send the host header www.application.com 在请求中,它会正确响应网站内容。当我直接向地址发出请求时(从 curl 或邮递员 wieh 正确的主机 header),该站点几乎立即响应(即不到一秒钟)。 IE。我认为这不是 FrontDoor 超时问题。

我们已经配置了一个 FD 后端池,以便主机 header www.application.com is sent for requests to this backend ( https://application-eastus2-01.application.com). However, when i attempt to access https://www.application.com(通过 FrontDoor 为该 DNS 路由的地址)FD 以 503 状态响应。我不认为这与超时问题有关,除非其他配置错误。

在查看此 Azure Monitor 日志时,似乎一切都已正确配置。

我研究过这个 MS 文档:https://docs.microsoft.com/en-us/azure/frontdoor/front-door-troubleshoot-routing

我不知道是什么导致了 503 响应。我们还能尝试什么来解决问题?

最终成为自我证书的问题。似乎 AFD 需要在后端和有效且受 CA 保护的公共容器上有一个证书。在默认后端和正在提供服务的应用程序上的方法。