Kubernetes NGINX Ingress controller looking for service in the wrong namespace

5/28/2020

Scenario I am running into trouble:

  • I have a Kubernetes cluster, nginx ingress controller installed
  • I created a namespace preview
  • Inside namespace preview I create a deployment, a service A, and an Ingress
  • I double check the logs of the pods, I can see the containers are up and running
  • NGINX picks up the Ingress. However, when I make a request to the ingress, I can see in the logs that is looking for the service in the default namespace instead of namespace preview. However, the ingress, the service and the deployment, all the 3 are in the namespace preview and not in the namespace default.

Is there any way to tell NGINX to use a service from a namespace different from preview?

-- Jose
kubernetes
nginx-ingress

0 Answers