<p>I have an issue I can't figure out. I have setup Nginx Ingress Controller on my managed k8s cluster. I'm trying to reach an SSL enabled pod behind and it does not work. I have 404 not found from Nginx and the certificate which is presented is the Nginx one. I have deployed the controller using their github repo and the default files following their doc.
I have setup a clear http pod for purpose tests and it works. It seems to be related to ssl.
I have tried many things to no avail. How can I reach an SSL pod behind nginx ?</p>
<p>Here's the Deployment + service (for the https one) resource I have setup :</p>
<pre><code>apiVersion: apps/v1
kind: Deployment 
metadata:
 name: moulip-https
spec:
 selector:
   matchLabels:
     app: moulip-https
replicas: 2
template:
 metadata:
  labels:
    app: moulip-https
spec:
  containers:
  - name: &quot;wabam&quot; 
    image: &quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&quot;
    ports:
    - containerPort: 443
  imagePullSecrets:
  - name: regcrd
---      
apiVersion: v1
kind: Service
metadata:
 name: https-svc
 labels:
   app: moulip-https
spec:
  ports:
  - port: 443
    targetPort: 443
    protocol: TCP
    name: https
selector:
  app: moulip-https
</code></pre>
<p>and my Ingress :</p>
<pre><code>apiVersion: extensions/v1beta1 
kind: Ingress
metadata:
  name: ingress
  annotations:
   nginx.ingress.kubernetes.io/secure-backends: &quot;true&quot;
   nginx.ingress.kubernetes.io/ssl-passthrough: &quot;true&quot;
   nginx.ingress.kubernetes.io/backend-protocol: &quot;HTTPS&quot;
   nginx.ingress.kubernetes.io/rewrite-target: /
namespace: default
spec:
 rules:
  - host: https.moulip.lan
    http:
     paths:
      - backend:
          serviceName: https-svc
          servicePort: 443
  - host: test.moulip.lan
    http:
     paths:
      - backend:
          serviceName: hostname-svc
          servicePort: 80
</code></pre>
<p>Many thanks for any guidance you could provide me with.</p>

moulip
<p>You are missing tls configuration in the ingress. follow sample below</p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
  name: testsecret-tls
  namespace: default
data:
  tls.crt: base64 encoded cert
  tls.key: base64 encoded key
type: kubernetes.io/tls
---
</code></pre>
<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: tls-example-ingress
spec:
  tls:
  - hosts:
      - sslexample.foo.com
    secretName: testsecret-tls
  rules:
  - host: sslexample.foo.com
    http:
      paths:
      - path: /
        backend:
          serviceName: service1
          servicePort: 80

</code></pre>
