<p>I have configured ssl certificate, if I visit <code>https://&lt;domain&gt;.com</code>, I see that my certificate is configured successfully but when I try to check certificate by following command</p>
<pre><code>openssl s_client -connect &lt;domain&gt;.com:443 | openssl x509 -noout -subject -issuer
</code></pre>
<p>i am getting <code>Kubernetes Ingress Controller Fake Certificate</code></p>
<p>My ingres config is :</p>
<pre><code>  annotations:
    nginx.ingress.kubernetes.io/ssl-redirect: 'true'
    nginx.ingress.kubernetes.io/from-to-www-redirect: 'true'
  name: nginx-echo
spec:
  tls:
    - hosts:
      - domain.com
      secretName: domain.com
  rules:
    - host: domain.com
      http:
        paths:
        - path: /
          pathType: Prefix
          backend:
            service:
                name: website-lorem
                port:
                    number: 80
</code></pre>
<p>with command gives the same fake certificate:
<code>openssl s_client -connect &lt;domain&gt;.com:443 -servername &lt;domain&gt; | openssl x509 -noout -subject -issuer</code></p>
<p>Logs:</p>
<pre><code> 6 flags.go:205] Watching for Ingress class: nginx
W1029 22:02:36.331841       6 flags.go:210] Ingresses with an empty class will also be processed by this Ingress controllernginx
W1029 22:02:36.332409       6 flags.go:252] SSL certificate chain completion is disabled (--enable-ssl-chain-completion=false)
W1029 22:02:36.332525       6 client_config.go:552] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
I1029 22:02:36.332855       6 main.go:231] Creating API client for https://&lt;ip&gt;:443
I1029 22:02:36.342532       6 main.go:275] Running in Kubernetes cluster version v1.19 (v1.19.2) - git (clean) commit f57430*** - platform linux/amd64
I1029 22:02:36.470142       6 main.go:105] SSL fake certificate created /etc/ingress-controller/ssl/default-fake-certificate.pem
I1029 22:02:36.472357       6 main.go:113] Enabling new Ingress features available since Kubernetes v1.18
W1029 22:02:36.476751       6 main.go:125] No IngressClass resource with name nginx found. Only annotation will be used.
I1029 22:02:36.485119       6 ssl.go:528] loading tls certificate from certificate path /usr/local/certificates/cert and key path /usr/local/certificates/key
I1029 22:02:36.544518       6 nginx.go:263] Starting NGINX Ingress controller

</code></pre>

user8462556
<p>Problem was that</p>
<ol>
<li><code>--default-ssl-certificate</code> flag was not set. More details can be found <a href="https://kubernetes.github.io/ingress-nginx/user-guide/tls/#default-ssl-certificate" rel="noreferrer">here</a></li>
<li><code>Intermediate certificate</code> was not set. Please check <a href="https://stackoverflow.com/q/45796058/11148139">this thread</a> for more details.</li>
</ol>
<p>Now its working.</p>
<p>There is also a <a href="https://github.com/kubernetes/ingress-nginx/issues/6398" rel="noreferrer">Github thread</a> with this issue.</p>
