Azure Traffic Manager监视器状态降级

huangapple go评论104阅读模式
英文:

Azure Traffic Manager Monitor Status Degraded

问题

Azure Traffic Manager监视器状态为"降级"

我部署了Azure Traffic Manager(路由模式:地理)然后添加了一个端点。目标在Kubernetes集群内运行。因此,端点配置如下:

  1. 名称:测试
  2. 类型:外部端点
  3. 目标:1.2.3.4KubernetesNGINX Ingress ControllerIP地址)
  4. 自定义标头设置:host:my-test-url.com
  5. 地理映射:所有(全球)
  6. 健康检查:已启用

通过浏览器访问my-test-url.com URL,可以正常加载UI。但是使用CURL命令会返回302(Found)?

  1. curl -H -K my-test-url.com
  2. <html>
  3. <head><title>302 Found</title></head>
  4. <body>
  5. <center><h1>302 Found</h1></center>
  6. <hr><center>nginx</center>
  7. </body>
  8. </html>

WGET命令返回:

  1. wget https://my-test-url.com
  2. --2023-07-10 12:20:37-- https://my-test-url.com /
  3. 解析my-test-url.commy-test-url.com)... 1.2.3.4NGINX IngressIP
  4. 连接到my-test-url.commy-test-url.com)|1.2.3.4|:443... 已连接。
  5. 发送HTTP请求,等待响应... 302 Moved Temporarily
  6. 位置:https://my-test-url.com /swagger-ui/index.html [following]
  7. --2023-07-10 12:20:41-- https://my-test-url.com /swagger-ui/index.html
  8. 重用到my-test-url.com443的现有连接。
  9. 发送HTTP请求,等待响应... 200
  10. 长度:734 [text/html]
  11. 保存到:‘index.html.2
  12. index.html.2 100%[=====================================================================================================>] 734 --.-KB/s in 0s
  13. 2023-07-10 12:20:41 (175 MB/s) - index.html.2 saved [734/734]

在Azure Traffic Manager配置中,我添加了以下内容:

  1. 预期的状态码范围(默认:200
  2. 200-299,300-305
  3. 路径:/swagger-ui/index.html
  4. 协议:HTTPS
  5. 端口:443

因此,当我访问Traffic Manager的URL http://my-test-tm.trafficmanager.net 时,它返回 404 Not Found NGINX

Kubernetes集群部署的VNET附加了以下NSG:

入站规则

  1. 优先级 名称 端口 协议 目标 操作
  2. 100 允许1 任何 TCP 某些IP 任何 允许
  3. 110 允许2 80,443 TCP 任何 任何 允许
  4. 65000 允许3 任何 任何 虚拟网络 虚拟网络 允许
  5. 65001 允许4 任何 任何 Azure负载均衡器 任何 允许
  6. 65500 拒绝所有 任何 任何 任何 任何 拒绝

出站规则

  1. 优先级 名称 端口 协议 目标 操作
  2. 65000 允许5 任何 TCP 虚拟网络 虚拟网络 允许
  3. 65001 允许6 80,443 TCP 任何 任何 允许
  4. 65500 拒绝2 任何 任何 任何 拒绝
英文:

Azure Traffic Manager Monitor status "Degraded"

I deployed Azure Traffic Manager (Routing Mode: Geographic) and then added one endpoint to it. The target runs inside a Kubernetes cluster. So the endpoint configurations are as follows.

  1. Name: Test
  2. Type: External-Endpoint
  3. Target: 1.2.3.4 (IP Address of NGINX Ingress Controller in Kubernetes)
  4. Custom Header Settings: host:my-test-url.com
  5. Geo-mapping: All(World)
  6. Health checks: Enabled

my-test-url.com URL is accessible through the browser and it loads the UI as expected. But CURL command gives 302(Found)?

  1. curl -H -K my-test-url.com
  2. <html>
  3. <head><title>302 Found</title></head>
  4. <body>
  5. <center><h1>302 Found</h1></center>
  6. <hr><center>nginx</center>
  7. </body>
  8. </html>

WGET gives

  1. wget https://my-test-url.com
  2. --2023-07-10 12:20:37-- https://my-test-url.com /
  3. Resolving my-test-url.com (my-test-url.com )... 1.2.3.4 (IP of NGINX Ingress)
  4. Connecting to my-test-url.com (my-test-url.com )|1.2.3.4|:443... connected.
  5. HTTP request sent, awaiting response... 302 Moved Temporarily
  6. Location: https://my-test-url.com /swagger-ui/index.html [following]
  7. --2023-07-10 12:20:41-- https://my-test-url.com /swagger-ui/index.html
  8. Reusing existing connection to my-test-url.com :443.
  9. HTTP request sent, awaiting response... 200
  10. Length: 734 [text/html]
  11. Saving to: index.html.2
  12. index.html.2 100%[=====================================================================================================>] 734 --.-KB/s in 0s
  13. 2023-07-10 12:20:41 (175 MB/s) - index.html.2 saved [734/734]

In Azure Traffic Manager configuration, I have added

  1. Expected Status Code Ranges (default: 200)
  2. 200-299,300-305
  3. Path: /swagger-ui/index.html
  4. Protocol: HTTPS
  5. Port: 443

So when I hit the url of the Traffic Manager http://my-test-tm.trafficmanager.net it gives 404 Not Found NGINX

The VNET where Kubernetes cluster is deployed has these NSGs attached.

Inbound Rules

  1. Priority Name Port Protocol Source Destination Action
  2. 100 Allow1 Any TCP Some IPs Any Allow
  3. 110 Allow2 80,443 TCP Any Any Allow
  4. 65000 Allow3 Any Any VirtualNetwork VirtualNetwork Allow
  5. 65001 Allow4 Any Any AzureLoadBalancer Any Allow
  6. 65500 DenyAll Any Any Any Any Deny

OutBound Rules

  1. Priority Name Port Protocol Source Destination Action
  2. 65000 Allow5 Any TCP VirtualNetwork VirtualNetwork Allow
  3. 65001 Allow6 80,443 TCP Any Any Allow
  4. 65500 Deny2 Any Any Any Deny

答案1

得分: 0

问题已解决。我在使用Azure负载均衡器的内部版本,并从这些内部网络进行DNS请求,因此不能使用Traffic Manager来路由此流量。

微软提供的更多信息

英文:

Issue solved. I was using an Internal version of Azure Load Balancer and making DNS requests from such internal networks, then you can’t use Traffic Manager to route this traffic.

More Information from Microsoft

huangapple
  • 本文由 发表于 2023年7月10日 17:27:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/76652425.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定