I have cluster on GKE with expose of loadbalancer type service. to add SSL, I create service NODE PORT and add ingress to it. I have done this many time and it works. but in this case, ingress show the GCP load balancer as unhealthy. If I edit the GCP load balancer, to use the health check created by the GKE LoadBalacner service, it then start to work and I can browser the ingress service. But as soon as I switch it back to the health check created by the Ingress service it will start failing again. I thougt maybe it is firewall issue so I added allow all protocols for the Internet which did not help. How do I get the ingress to work?
I have managed to resolve this issue: The legacy health check that was created on ingress did not care about the response from health check as long as there is a response. The new health check is making GET request to root path and want to be responded with 2xx status. but my site is replying with 302 for login if you do not have a cookie which renders the health check as unhealthy. Adding a probe to the workload container spec with correct path for health check and containerport (must) will generate the correct health check. Notice that if you add them to existing pods, you need to recreate the ingress as it will not update.