Google Container Engine中的HTTPS负载平衡器 [英] HTTPS load balancer in Google Container Engine

查看:103
本文介绍了Google Container Engine中的HTTPS负载平衡器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 HTTPS L7负载均衡器,但由于某些原因无法正常工作.甚至 HTTP负载平衡演练中的HTTP负载平衡器.转发规则的IP地址已创建,我能够ping通和telnet到端口80.但是当通过curl请求时,它给我一个错误.

<title>502 Server Error</title> </head> <body text=#000000 
bgcolor=#ffffff> <h1>Error: Server Error</h1> <h2>The server 
encountered a temporary error and could not complete your request. 
<p>Please try again in 30 seconds.</h2> <h2></h2> </body></html>

所有步骤都很好,我为$ {NODE_PORT}创建了一个没有任何标签的防火墙,但是没有用.

有人遇到过这个问题吗?

解决方案

我的应用程序遇到了同样的问题,问题在于我们没有返回成功"的端点,并且运行状况检查始终失败. >

如果运行状况检查未通过,HTTP/HTTPS负载平衡器似乎不会将请求发送到群集节点,因此我的解决方案是创建一个始终返回200 OK的端点,并在运行状况检查后立即返回在通过时,LB开始工作.

I'm trying to set up an HTTPS load balancer for GKE using HTTPS L7 load balancer but for some reason is not working. Even the HTTP load balancer in the HTTP Load Balancing walkthrough. The forwarding rule's IP address is created and I'm able to ping and telnet to port 80. But when request via curl it give me a error.

<title>502 Server Error</title> </head> <body text=#000000 
bgcolor=#ffffff> <h1>Error: Server Error</h1> <h2>The server 
encountered a temporary error and could not complete your request. 
<p>Please try again in 30 seconds.</h2> <h2></h2> </body></html>

All the steps were fine and I created a firewall without any tags for the ${NODE_PORT} but it didn't work.

Has anyone encountered this problem?

解决方案

I had the same problem with my application, the problem is that we did not have an endpoint returning "Success" and the health checks were always failing.

It seems that the HTTP/HTTPS load balancer will not send the request to the cluster nodes if the health checks are not passing, so my solution was to create an endpoint that always returns 200 OK, and as soon as the health checks were passing, the LB started working.

这篇关于Google Container Engine中的HTTPS负载平衡器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆