Kubernetes ingress-nginx wildcard (_) hostname is before ingress hostnames

9/21/2021

It seems that the ingress-nginx-controller has set a server configuration for a wildcard/default hostname i.e. 'servername ;'. This server comes before the other hosts inside the config and I believe this is causing all requests to go to the 404 (as there is no default backend defined).

There is 3 ingress services inside the one ingress controller, all beneath this default host. All 3 services are sent to 404. When i manually remove that and reload, the next host is where all traffic is directed. I'm not sure whether this is an issue with the nginx instance on the host or not.

-- Brayden
ingress-nginx
kubernetes
kubernetes-ingress
nginx

1 Answer

9/21/2021

I found the issue, on the host's nginx server I wasn't forwarding the host header with the proxy pass, therefore it was always getting caught on the first host.

-- Brayden
Source: StackOverflow