I am using the nginx ingress controller on two k8s clusters. On one the HTTPS works as expected, but on the other HTTPS traffic always routes to the default 404 backend. I'm not sure how to troubleshoot this.
I have the TLS secret setup and the ingress references it. The ingress controller does serve up https, but only the default 404 backend. A few lines from the ingress controller logs:
127.0.0.1 - [127.0.0.1] - - [14/Apr/2017:02:15:15 +0000] "GET /login?from=%2F HTTP/2.0" 404 142 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36" 29 0.002 [upstream-default-backend] 10.200.46.5:8080 21 0.002 404
::ffff:10.200.41.0 [14/Apr/2017:02:15:16 +0000] TCP [] [nginx-ssl-backend] 200 0 0 0.025
::ffff:10.200.35.0 [14/Apr/2017:02:15:03 +0000] TCP [jenkins.brdos1.k8s-dev.company.com] [nginx-ssl-backend] 200 215 51 0.059
::ffff:10.200.35.0 - [::ffff:10.200.35.0] - - [14/Apr/2017:15:00:11 +0000] "GET /login?from=%2F HTTP/1.1" 200 1826 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36" 471 0.008 [shared-tools-jenkins-service-8080] 10.200.33.2:8080 1814 0.008 200
The first log represents a valid request to the correct route, but it's returning a 404.
The fourth line shows a call to the same ingress route, but over http. This does serve my application. Here's my ingress.yaml. Any ideas?
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: jenkins-ingress
namespace: shared-tools
spec:
tls:
- hosts:
secretName: jenkins-secret
rules:
http:
paths:
- backend:
serviceName: jenkins-service
servicePort: 8080