title: Run Ingress in minikube and its address shows localhost
body: <p>I'm new to k8s. I deployed an ingress on minikube, and I found out its address to be <code>localhost</code> which it shouldn't be, I guess. For this, I don't know how to continue, for I should edit <code>/etc/hosts/</code> to add dns item, but no I could not.<br />
  <a href="https://i.stack.imgur.com/UPwcf.png" rel="noreferrer"><img src="https://i.stack.imgur.com/UPwcf.png" alt="enter image description here" /></a></p>
  <p>And this is my configuration file</p>
  <pre><code>kiloson@ubuntu:~$ cat kubia-ingress.yaml 
  apiVersion: networking.k8s.io/v1
  kind: Ingress
  metadata:
    name: kubia
    annotations:
      nginx.ingress.kubernetes.io/rewrite-target: /$1
  spec:
    rules:
    - host: kubia.example.com
      http:
        paths:
        - path: /
          pathType: Prefix
          backend:
            service: 
              name: kubia-nodeport
              port: 
                number: 80
  </code></pre>
  <p>minikube version</p>
  <pre><code>kiloson@ubuntu:~$ minikube version
  minikube version: v1.24.0
  commit: 76b94fb3c4e8ac5062daf70d60cf03ddcc0a741b
  </code></pre>
  <p>Ubuntu Info</p>
  <pre><code>kiloson@ubuntu:~$ neofetch
              .-/+oossssoo+/-.               kiloson@ubuntu 
          `:+ssssssssssssssssss+:`           -------------- 
        -+ssssssssssssssssssyyssss+-         OS: Ubuntu 20.04.3 LTS x86_64 
      .ossssssssssssssssssdMMMNysssso.       Host: Virtual Machine 7.0 
     /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 5.11.0-1022-azure 
    +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 2 hours, 33 mins 
   /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 648 (dpkg), 4 (snap) 
  .ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: bash 5.0.17 
  +sssshhhyNMMNyssssssssssssyNMMMysssssss+   Terminal: /dev/pts/0 
  ossyNMMMNyMMhsssssssssssssshmmmhssssssso   CPU: Intel Xeon E5-2673 v4 (2) @ 2.294GHz 
  ossyNMMMNyMMhsssssssssssssshmmmhssssssso   GPU: 00:08.0 Microsoft Corporation Hyper-V virtual VGA 
  +sssshhhyNMMNyssssssssssssyNMMMysssssss+   Memory: 1493MiB / 7959MiB 
  .ssssssssdMMMNhsssssssssshNMMMdssssssss.
   /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/                            
    +sssssssssdmydMMMMMMMMddddyssssssss+                             
     /ssssssssssshdmNNNNmyNMMMMhssssss/
      .ossssssssssssssssssdMMMNysssso.
        -+sssssssssssssssssyyyssss+-
          `:+ssssssssssssssssss+:`
              .-/+oossssoo+/-.
  </code></pre>