<p>I am pretty novice in Kubernetes.</p>
<p>From the <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" rel="nofollow noreferrer">Kubernetes website</a>, on 'host' field in ingress:</p>
<blockquote>
<p>An optional host. In this example, no host is specified, so the rule
applies to all inbound HTTP traffic through the IP address specified.
If a host is provided (for example, foo.bar.com), the rules apply to
that host.</p>
</blockquote>
<p>So if I have host as 'x.y.z', path as '/my-service', then only a call like 'x.y.z/my-service/....' would be directed to the configured backend service.</p>
<p>If host is not set, then any call with /my-service in its url would be send to configured backend.</p>
<blockquote>
<p>x.y.z/my-service/..</p>
<p>a.b.c/my-service/..</p>
</blockquote>
<p>Both would be directed to backend.</p>
<p>Is my understanding correct?</p>

Mandroid
<p>Generally speaking, your understanding is correct.</p>
<p><code>Host</code> is a optional parameter that indicates to use a certain host. The usage of the <code>host</code> argument is also related to the DNS management of that address, so in order to use it you also need to either:</p>
<ul>
<li>add the hostname into the DNS record</li>
<li>edit the <code>/etc/hosts</code> file (if you're running your environment locally) with the association <code>ip hostname</code></li>
</ul>
<p>After you set this up, you match any path that starts with <code>http://host/path</code>, e.g. <code>http://host/path/1</code>, <code>http://host/path/2</code>.</p>
<p>You don't match any path that either modify the host or the path prefix.</p>
