-
Hi my setup:
deployment:
nginx service
My app Ingress
Services:
ingress
Pods
I configured "example.com" internally on my pc pointing to the worker node IP of my cluster.
But I don't get any response when using the domain name in the URL. any help is appreciated. However, I get a "Welcome to nginx!" when I use the NodePort directly: http://example.com:30000/
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
From your service names I suspect you might be using the Kubernetes Community ingress controller which uses NGINX under the hood as the proxy. That project can be found here: https://github.com/kubernetes/ingress-nginx/ and is commonly also called "ingress-nginx" This project is maintained by NGINX and is contained in the repository here. |
Beta Was this translation helpful? Give feedback.
-
Hi I add the following line after the proxy_path: proxy_set_header Host $host; |
Beta Was this translation helpful? Give feedback.
Hi
I found my issue and fixed it. The issue was in the reverse proxy configuration where I missed passing the hostname to the ingress controller in Kubernetes.
I am using an Nginx reverse proxy in front of my Kubernetes cluster.
The traffic was forwarded to the ingress controller in Kubernetes, but the host header was missing, so the ingress controller could not match the hostname that was configured in the ingress yaml file.
I add the following line after the proxy_path: proxy_set_header Host $host;
and everything works fine now.