<p>I am using minikube for developing an application on Kubernetes and I am using Traefik as the ingress controller.</p>

<p>I am able to connect and use my application services when I use the url of the host which I defined in the ingress ("streambridge.local") and I set up in the linux hosts ("/etc/hosts"). But when I use the exact same ip address that I used for the dns I am not able to connect to any of the services and I receive "404 page not found". I have to mention that I am using the IP address of the <code>minikube</code> which I got by: <code>$(minikube ip)</code>. Below is my ingress config and the commnads that I used for the dns.</p>

<p>How I can connect and use my application services with the IP?</p>

<p>Ingress config:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: my-ingress
  annotations:
    kubernetes.io/ingress.class: "traefik"
    traefik.frontend.rule.type: PathPrefixStrip
    traefik.frontend.passHostHeader: "true"
    traefik.backend.loadbalancer.sticky: "true"
    traefik.wss.protocol: http
    traefik.wss.protocol: https
spec:
  rules:
  - host: streambridge.local
    http:
      paths:
      - path: /dashboard
        backend:
          serviceName: dashboard
          servicePort: 9009
      - path: /rdb
        backend:
          serviceName: rethinkdb
          servicePort: 8085
</code></pre>

<p>My <code>/etc/hosts</code>:</p>

<pre><code>127.0.0.1   localhost

192.168.99.100 traefik-ui.minikube
192.168.99.100 streambridge.local
</code></pre>

<p>This works: <code>http://streambridge.local/rdb</code></p>

<p>But this does not work: <code>http://192.168.99.100/rdb</code> and returns <code>404 page not found</code></p>

AVarf
<p>You have created ingress routes that evaluate the host header of the http request. So while you are actually connecting to the same ip, it is once with host:streambridge.local and once with "192.168.99.100" for which you did not add a rule in traefik. This is therefore working exactly as configured.</p>
