<p>I followed the tutorial from <a href="https://www.haproxy.com/documentation/hapee/1-9r1/traffic-management/kubernetes-ingress-controller/" rel="nofollow noreferrer">https://www.haproxy.com/documentation/hapee/1-9r1/traffic-management/kubernetes-ingress-controller/</a> to setup the haproxy controller (community edition) and the "Echo Server" App that should be accessed.</p>

<p>When I run <code>curl -L -H 'Host: echo.example.com' localhost:30884</code> I get the desired response</p>

<pre><code>Request served by app-58f7d69f54-p2kq8

HTTP/1.1 GET /

Host: echo.example.com
User-Agent: curl/7.61.1
Accept: */*
X-Forwarded-For: 10.42.0.0

</code></pre>

<p>However if I just use <code>curl -L  echo.example.com:30884</code> I get the response <code>default backend - 404</code>
So apperently the request reaches the ingress controller, but the ingress controller doesn't know which host should be used.</p>

<p>Running <code>kubectl get ing</code> gives me</p>

<pre><code>eignungstest              eignungstest.example.com          10.43.173.120   80      17h
kube-web-view             dashboard.example.com                             80      16h
web-ingress               echo.example.com                                  80      16h
</code></pre>

<p>it seems there is no address assigned, but running the same commands above with the host <code>eignungstest.example.com</code> I get the same results, so that should be of no relevance.</p>

<p>Is there a setting I'm missing that prevents the host header from being passed when I dont explicitly specify it?</p>

<p>Ingress controller and ingress looks fine. </p>

<p>As you can see in your <code>kubectl</code> response the ingress is pointing to port 80 of that service which would pick up <code>echo.example.com</code>. </p>

<p>So it only knows about port 80 of echo.example.com, but when you try <code>curl -L echo.example.com:30884</code>, it is checking for that particular port and routing all the traffic to default backend. </p>

<p>Make sure you could directly <code>curl -L echo.example.com</code>, if it doesn't work check the service if the service has something similar.</p>

<pre><code>spec:
  ports:
    - port: 80
      targetPort: 3001
</code></pre>

<p>You might have done the service part right as well. Hope this helps.</p>
