<p>I'm using kubernetes <a href="https://github.com/kubernetes/ingress-nginx/" rel="noreferrer">ingress-nginx</a> and this is my Ingress spec. <a href="http://example.com" rel="noreferrer">http://example.com</a> works fine as expected. But when I go to <a href="https://example.com" rel="noreferrer">https://example.com</a> it still works, but pointing to default-backend with Fake Ingress Controller certificate. How can I disable this behaviour? I want to disable listening on https at all on this particular ingress, since there is no TLS configured.</p>

<pre><code>kind: Ingress
apiVersion: extensions/v1beta1
metadata:
  name: http-ingress
  annotations:
    kubernetes.io/ingress.class: "nginx"
spec:
  rules:
    - host: example.com
      http:
        paths:
          - backend:
              serviceName: my-deployment
              servicePort: 80
</code></pre>

<p>I've tried this <code>nginx.ingress.kubernetes.io/ssl-redirect: "false"</code> annotation. However this has no effect.</p>

<p>I'm not aware of an ingress-nginx <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/" rel="noreferrer">configmap</a> value or ingress <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/" rel="noreferrer">annotation</a> to easily disable TLS. </p>

<p>You could remove port 443 from your ingress controllers service definition.</p>

<p>Remove the <code>https</code> entry from the <code>spec.ports</code> array </p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: mingress-nginx-ingress-controller
spec:
  ports:
  - name: https
    nodePort: NNNNN
    port: 443
    protocol: TCP
    targetPort: https
</code></pre>

<p>nginx will still be listening on a TLS port, but no clients outside the cluster will be able to connect to it.</p>
