Our nginx ingress controller is behind a loadbalancer. The Loadbalancer ist setting the the origing Host in the X-Forwarded-For Headers. For example: "x-forwarded-host": "www.portal-app.de".
I have have also set use-forwarded-headers: "true" in ingress.
My Ingress Rule:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: kd-portal-ingress
namespace: kd-portal-prod
spec:
rules:
- host: www.portal-app.de
http:
paths:
- backend:
serviceName: my-portal-app
servicePort: 5050
When i call the Url we get allways the nginx default 404 Page.
It try too explain the scenario. www.portal-app.de is landing on a apache loadbalancer. This LB will proxy the request to the ip where k8s and ingresscontroller is running. The proxy set the origin host infos in the x-forward headers. My Rule does not have any effect, i am allways hitting the default backend
Is it possible to define a hostbased routing behind a loadbalancer in ingress?