Is this a BUG REPORT or FEATURE REQUEST? (choose one):
Not sure this is a bug or I am doing smth wrong. Steps to reproduce:
/etc/hosts so that minikube ip points to example.comkubectl create namespace testkubectl run nginx --image nginx -n=testkubectl expose deployment nginx --port 80 -n=testkubectl apply -f ingress.yaml -n=testapiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: nginx-test
spec:
tls:
- hosts:
- example.com
secretName: self-signed
rules:
- host: example.com
http:
paths:
- path: /
backend:
serviceName: nginx
servicePort: 80
If I open example.com in a browser, I see 404 default backend. However, if run kubectl apply -f ingress.yaml -n=default I can see nginx welcome page and I can seethe cert used to create tls secret:

So, somehow it works for me only if an ingress is created in a default namespace AND in a target namespace.
Can someone help me figure out what I am doing wrong here?
NGINX Ingress controller version:
quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.16.2
Kubernetes version (use kubectl version):
eugene@ivantsoft ~/Documents/tls/examplecom $ kubectl version
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.2", GitCommit:"bb9ffb1654d4a729bb4cec18ff088eacc153c239", GitTreeState:"clean", BuildDate:"2018-08-07T23:17:28Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.0", GitCommit:"fc32d2f3698e36b93322a3465f63a14e9f0eaead", GitTreeState:"clean", BuildDate:"2018-03-26T16:44:10Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
Environment:
Minikube on Fedora 28
Closing. The 404 is because the Ingress is not being defined in the same namespace than the service.
@aledbf But I definite both in test namespace.
Besides, when an ingress cannot find backend service, it's 503 not 404
@aledbf please take a look at this short video. It actually shows in what namespaces service and ingress are:
@eivantsov from the video I see the secret only exists in the default namespace https://youtu.be/DE5hDs4O1to?t=14
You need to copy the secret to the test namespace too
@aledbf thanks, just tried that - no luck. I still see default backend 404.
Update. Sorry, my bad. It did work. Thanks.
@aledbf please take a look at this short video. It actually shows in what namespaces service and ingress are:
This video is no longer available and I'm facing the same issue.. Any idea what this video was all about? Sorry for commenting on an older issue.
Indeed I would like to see what the video was about, I'm facing the same problem currently
Most helpful comment
This video is no longer available and I'm facing the same issue.. Any idea what this video was all about? Sorry for commenting on an older issue.