google compute engine - your - HTTPS load balancer in Google Container Engine

kubernetes https load balancer (4)

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.

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

502 Server Error

Error: Server Error

The server encountered a temporary error and could not complete your request.

Please try again in 30 seconds.

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

Has anyone encountered this problem?

I just walked through the example and (prior to opening up a firewall for $NODE_PORT) saw the same 502 error.

If you look in the cloud console at<project>/loadbalancing/http/backendServices/details/web-map-backend-service

you should see that the backend shows 0 out of ${num_nodes_in_cluster} as healthy.

For your firewall definition, make sure that you set the source filter to to allow traffic from the the load balancing service and set the allowed protocols and ports to tcp:$NODE_PORT.

In my case, the load balancer was returning this error because there was no web server running on my instances and instance-groups to handle the network request.

I installed nginx on all the machines and then it started working.

From now on, I made a point to add nginx in my startup script while creating the vm/instance.

The issue resolved after a few minutes (like 5-10 minutes) in my case.