<p>I'm new to Kubernetes and I'm trying to do HTTP Load Balancing on Google Container Engine with TLS (using the included GCE Ingress Controller). The error I have is repeatable even following <a href="https://cloud.google.com/container-engine/docs/tutorials/http-balancer" rel="nofollow noreferrer">Google's official tutorial</a>. For readability I summarize the procedure in <code>config.yaml</code>:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: nginx
spec:
  replicas: 1
  template:
    metadata:
      labels:
        name: nginx
    spec:
      containers:
      - name: nginx
        image: nginx
        ports:
        - containerPort: 80

---

apiVersion: v1
kind: Service
metadata:
  name: nginx
  labels:
    name: nginx
spec:
  type: NodePort
  ports:
  - port: 80
    targetPort: 80
  selector:
    name: nginx

---

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: basic-ingress
spec:
  backend:
    serviceName: nginx
    servicePort: 80
</code></pre>

<p>Then:</p>

<pre><code>kubectl create -f config.yaml
export NODE_PORT=$(kubectl get -o jsonpath="{.spec.ports[0].nodePort}" services nginx)
gcloud compute firewall-rules create allow-130-211-0-0-22   --source-ranges 130.211.0.0/22   --allow tcp:$NODE_PORT
curl &lt;ip_of_load_balancer&gt;
</code></pre>

<p>(I removed the tags on the firewall rule so it will apply for all).</p>

<p>But I get a <code>502 Server Error</code>, which <a href="https://github.com/kubernetes/ingress/tree/master/controllers/gce#troubleshooting" rel="nofollow noreferrer">according to the docs</a> means it's likely bootstrapping (but it always stays like this). I can see on the console that the backend is unhealthy.</p>

<p>In the docs, to avoid this one needs:</p>

<ul>
<li>a firewall rule (which is done above)</li>
<li>Service must respond with 200 (but I tested the <code>nginx</code> image locally and the service via a general Load Balancer, works fine)</li>
</ul>

<p>So what is the cause of this error and how can I further debug this?</p>

<p>I left the cluster overnight and it is now working. It either seems it takes quite some to bootstrap or something was fixed on the Google Cloud side.</p>
