<p>I have a simple app which I am following from a basic tutorial :</p>
<p><a href="https://medium.com/@bhargavshah2011/hello-world-on-kubernetes-cluster-6bec6f4b1bfd" rel="nofollow noreferrer">https://medium.com/@bhargavshah2011/hello-world-on-kubernetes-cluster-6bec6f4b1bfd</a></p>
<ol>
<li>I create a cluster <strong>hello-world2-cluster</strong></li>
</ol>
<p><a href="https://i.stack.imgur.com/ghe6a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ghe6a.png" alt="enter image description here" /></a></p>
<ol start="2">
<li><p>I &quot;connect&quot; to the cluster using :</p>
<p><strong>gcloud container clusters get-credentials hello-world2-cluster --zone us-central1-c --project strange-vortex-286312</strong></p>
</li>
<li><p>I perform a git clone of the &quot;hellow world&quot; project, which is basically some kind of snake game :</p>
<p><strong>$ git clone <a href="https://github.com/skynet86/hello-world-k8s.git" rel="nofollow noreferrer">https://github.com/skynet86/hello-world-k8s.git</a></strong></p>
<p><strong>$ cd hello-world-k8s/</strong></p>
</li>
</ol>
<p>Next I run &quot;create&quot; on the YAML:</p>
<pre><code>kubectl create -f hello-world.yaml
</code></pre>
<p>Deplyments and services are created as expected :</p>
<p><a href="https://i.stack.imgur.com/Mzm06.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Mzm06.png" alt="enter image description here" /></a></p>
<p><em>Fine! ALl good!</em></p>
<p><em>But.... now what????</em></p>
<p>What do I do now?</p>
<p>I want to access this app from the outside world. Where is the URL where I can access the application?</p>
<p>How can I get my friend Bob in Timbuktu to call some kind of URL (no need for DNS) to access my application?</p>
<p>I know the answer has something to do with LoadBalancer nodes and Ingress, but there seems to be no proper documentation out there on how to do this for a simple hello world app.</p>

Oliver Watkins
<p><strong>GKE hello-world with <code>Ingress</code> Official Example</strong>: <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/load-balance-ingress" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/how-to/load-balance-ingress</a></p>
<p>The ingress controller is built-in in GKE, you just need a <code>kind: Ingress</code> object that points to your <code>Service</code>. Addressing your question:</p>
<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: hello-ingress
  annotations:
    kubernetes.io/ingress.class: &quot;gce&quot;
spec:
  rules:
  - http:
      paths:
      - path: /*
        backend:
          serviceName: hello-world
          servicePort: 80
</code></pre>
<p>Once deployed, query <code>kubectl get ingress hello-ingress -oyaml</code> to find out the resulting load-balancer's IP in the <code>status:</code> field.</p>
