<p>I am having trouble using the HTTP Load Balancer (Layer 7) with a service in GKE. I originally exposed the service in GKE using the LoadBalancer service type:</p>

<p>kubectl expose deployment myservice --type="LoadBalancer"</p>

<p>This will create a public IP address for my cluster in the same zone and it has been working well. My goal is to use a global IP address with SSL support for my service. This is what I have tried:</p>

<ol>
<li>expose the GKE service as NodePort type
kubectl expose deployment myservice --type=“NodeType”</li>
<li>follow the tutorial <a href="https://cloud.google.com/container-engine/docs/tutorials/http-balancer" rel="nofollow noreferrer">here</a> to create an ingress object. It didn’t work because the service in GKE is already in a managed instance group, and the ingress object would create a new instance group with zero instance. I found a discussion <a href="https://github.com/GoogleCloudPlatform/continuous-deployment-on-kubernetes/issues/49" rel="nofollow noreferrer">here</a>.</li>
<li>follow the suggestion in the discussion. Deleted to ingress object, and try to set up the HTTP Load Balancer manually from google cloud console. 

<ul>
<li>Added a firewall rules to allow 130.211.0.0/22 on port 80 and 8081 (my service port) on all targets.</li>
<li>Backend service is the managed Instance group created by GKE.</li>
<li>Created a health check on port 8081, path /health.
It still doesn’t work because the load balancer can recognize the correct number of instances in the managed instance group, but there are zero healthy nodes. My service has a health check endpoint myservice:8081/health and the root path "/" also returns HTTP 200 OK. I played with the health check configurations but the load balancer can never find a healthy node. </li>
</ul></li>
</ol>

<p>What am I missing? </p>

<p>It turns out if I want to follow the ingress tutorial, I cannot define a HTTP(S) Load Balancer on the same endpoint. You either choose to follow the tutorial and let the ingress object to define a LB automatically, which worked for me after deleting my testing LB, or do not use ingress and define LB manually (which I never got it working).</p>
