<p>I have no access to create a DNS/Domainname and therefore I am not able to fill the <code>host</code> field in my ingress' YAML file.</p>

<p>I simply want to use the IP like this:</p>

<p><code>10.10.10.10/foo</code></p>

<p><code>10.10.10.10/bar</code></p>

<p>This is my ingress' YAML file:</p>

<pre><code> apiVersion: extensions/v1beta1
    kind: Ingress
    metadata:
        name: foobar-ingress
        annotations:
            kubernetes.io/ingress.global-static-ip-name: foobar-trigger-static-ip
    spec:
        rules:
             http:
                  paths:
                      - path: /foo/*
                        backend:
                            serviceName: foo
                            servicePort: 80
                      - path: /bar/*
                        backend:
                            serviceName: bar
                            servicePort: 80
</code></pre>

<p>This is not valid as I try to push it with Helm. I was not able to find any information to that in <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networking/ingress/</a> since all the YAML examples are using a <code>host</code>. Is this even possible to do? Or is a host mandatory for that?</p>

<p><strong>EDIT</strong>: I am using the GCP LoadBalancer</p>

xetra11
<p>You can specify nginx class in annotation to rewrite the incoming requests as below</p>

<pre><code>apiVersion: extensions/v1beta1
    kind: Ingress
    metadata:
        name: foobar-ingress
        annotations:
          kubernetes.io/ingress.global-static-ip-name: foobar-trigger-static-ip
          kubernetes.io/ingress.class: nginx
          nginx.ingress.kubernetes.io/rewrite-target: /$1
    spec:
        rules:
             http:
                  paths:
                      - path: /foo/?(.*)
                        backend:
                            serviceName: foo
                            servicePort: 80
                      - path: /bar/?(.*)
                        backend:
                            serviceName: bar
                            servicePort: 80
</code></pre>
