<p>I'm trying to get an ingress controller working in Minikube and am following the steps in the K8s documentation <a href="https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/" rel="noreferrer">here</a>, but am seeing a different result in that the IP address for the ingress controller is different than that for Minikube (the example seems to indicate they should be the same):</p>

<pre class="lang-sh prettyprint-override"><code>$ kubectl get ingress
NAME              HOSTS              ADDRESS     PORTS   AGE
example-ingress   hello-world.info   10.0.2.15   80      12m

$ minikube ip
192.168.99.101
</code></pre>

<p>When I try to connect to the Minikube IP address (using the address directly vs. adding it to my local hosts file), I'm getting a "Not found" response from NGINX:</p>

<pre class="lang-sh prettyprint-override"><code>$ curl http://`minikube ip`/
&lt;html&gt;
    &lt;head&gt;&lt;title&gt;404 Not Found&lt;/title&gt;&lt;/head&gt;
    &lt;body&gt;
        &lt;center&gt;&lt;h1&gt;404 Not Found&lt;/h1&gt;&lt;/center&gt;
        &lt;hr&gt;&lt;center&gt;openresty/1.15.8.1&lt;/center&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>When I try to connect to the IP address associated with the ingress controller, it just hangs.</p>

<p>Should I expect the addresses to be the same as the K8s doc indicates?</p>

<p>Some additional information:</p>

<pre><code>$ kubectl get nodes -o wide
NAME       STATUS   ROLES    AGE     VERSION   INTERNAL-IP   EXTERNAL-IP   OS-IMAGE              KERNEL-VERSION   CONTAINER-RUNTIME
minikube   Ready    master   2d23h   v1.16.0   10.0.2.15     &lt;none&gt;        Buildroot 2018.05.3   4.15.0           docker://18.9.9

$ kubectl get ingresses example-ingress -o yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"networking.k8s.io/v1beta1","kind":"Ingress","metadata":{"annotations":{"nginx.ingress.kubernetes.io/rewrite-target":"/$1"},"name":"example-ingress","namespace":"default"},"spec":{"rules":[{"host":"hello-world.info","http":{"paths":[{"backend":{"serviceName":"web","servicePort":8080},"path":"/"}]}}]}}
    nginx.ingress.kubernetes.io/rewrite-target: /$1
  creationTimestamp: "2019-10-28T15:36:57Z"
  generation: 1
  name: example-ingress
  namespace: default
  resourceVersion: "25609"
  selfLink: /apis/extensions/v1beta1/namespaces/default/ingresses/example-ingress
  uid: 5e96c378-fbb1-4e8f-9738-3693cbce7d9b
spec:
  rules:
  - host: hello-world.info
    http:
      paths:
      - backend:
          serviceName: web
          servicePort: 8080
        path: /
status:
  loadBalancer:
    ingress:
    - ip: 10.0.2.15
</code></pre>

ShawnC
<p>Here’s what worked for me:</p>
<ol>
<li><p>minikube start</p>
</li>
<li><p>minikube addons enable ingress</p>
</li>
<li><p>minikube addons enable ingress-dns</p>
</li>
<li><p>Wait until you see the ingress-nginx-controller-XXXX is up and running using <code>Kubectl get pods -n ingress-nginx</code></p>
</li>
<li><p>Create an ingress using the K8s <a href="https://raw.githubusercontent.com/kubernetes/website/main/content/en/examples/service/networking/example-ingress.yaml" rel="noreferrer">example yaml file</a></p>
</li>
<li><p>Update the service section to point to the NodePort Service that you already created</p>
</li>
<li><p>Append
<code>127.0.0.1 hello-world.info</code>
to your /etc/hosts file on MacOS (<strong>NOTE:
Do NOT use the Minikube IP</strong>)</p>
</li>
<li><p>Run <code>minikube tunnel</code> ( Keep the window open. After you entered the password there will be no more messages, and the cursor just blinks)</p>
</li>
<li><p>Hit the <code>hello-world.info</code> ( or whatever host you configured in the yaml file) in a browser and it should work</p>
</li>
</ol>
