<h3>Wanted scenario:</h3>
<p>Given a virtual machine, with device IP <code>192.168.2.22</code>.  Run Kubernetes with minikube on it, serve API apps with ingress, services, and deployments. (minikube IP = ingress IP = <code>172.17.0.2</code> in the device)</p>
<p>And then expected to access these APIs / server from other PCs.</p>
<p>Here would like to ask about how can this scenario be fulfilled?  Hope someone can share their experiences &amp; wisdom.  Even some simple keywords may help.</p>
<h3>Tried</h3>
<p>My idea was to map <code>172.17.0.2</code> to the <code>localhost</code> / <code>127.0.0.1</code> on the device (with <code>iptable</code>), but then it turned out that the ingress actually needs the <code>host.name.com</code> string to work, so this failed.</p>
<h3>Ingress description</h3>
<pre><code>Name:             my-ingress
Namespace:        default
Address:          172.17.0.2
Default backend:  default-http-backend:80 (&lt;error: endpoints &quot;default-http-backend&quot; not found&gt;)
Rules:
  Host        Path  Backends
  ----        ----  --------
  localhost
              /route1/?(.*)   service1 (172.18.0.4:80)
              /route2/?(.*)   service2 (172.18.0.4:80)
Annotations:  kubernetes.io/ingress.class: nginx
              nginx.ingress.kubernetes.io/rewrite-target: /$1
</code></pre>

Ellie Wu
<ol>
<li>From the docs <a href="https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/" rel="nofollow noreferrer">here</a> you should be able to add the following line to the bottom of the <code>/etc/hosts</code> file.</li>
</ol>
<blockquote>
<p>Note: If you are running Minikube locally, use minikube ip to get the
external IP. The IP address displayed within the ingress list will be
the internal IP.</p>
</blockquote>
<pre><code> &lt;MINIKUBE-EXTERNAL-IP&gt; host.name.com
</code></pre>
<p>Then you can do curl <code>host.name.com</code></p>
<ol start="2">
<li>Alternatively use <code>xip.io</code> wildcard DNS where <code>172.17.0.2.xip.io</code> resolves to <code>172.17.0.2</code></li>
</ol>
