<p>I successfully deployed my web app on kubernetes in Google cloud. It is serving via http. I followed all guides on how to add ssl certificate and it was added according to Google cloud console however, it only work as http , when you try to access the web app as HTTPS. the browser says "This site can’t be reached"</p>

<p>my ingress YAML looks like this</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: no-rules-map
spec:
  tls:
  - secretName: testsecret
  backend:
    serviceName: s1
    servicePort: 80
</code></pre>

<p>for Secret</p>

<pre><code>apiVersion: v1
data:
  tls.crt: [crt]
  tls.key: [key]
kind: Secret
metadata:
  name: testsecret
  namespace: default
type: Opaque
</code></pre>

<p>I used this command to upload my ssl certificate </p>

<pre><code>kubectl create secret tls tls-secret --key=/tmp/tls.key --cert=/tmp/tls.crt
</code></pre>

<p>instead of yaml file Secret below and it works better. At least for Google Cloud </p>

<pre><code>apiVersion: v1
data:
  tls.crt: [crt]
  tls.key: [key]
kind: Secret
metadata:
  name: testsecret
  namespace: default
type: Opaque
</code></pre>

<p>Make sure when you go to <code>Kubernates Engine -&gt; Configuration</code> in Google Cloud Console that your secret type is  <code>Secret: kubernetes.io/tls</code> and not only <code>Secret</code>. when you create your secret using yaml it is created as secret only and not Secret: kubernetes.io/tls. </p>

<p>For more information you can take a look at these following links:
<a href="https://github.com/kubernetes/ingress-gce#backend-https" rel="nofollow noreferrer">https://github.com/kubernetes/ingress-gce#backend-https</a></p>

<p><a href="https://kubernetes.io/docs/concepts/services-networking/ingress/#tls" rel="nofollow noreferrer">enter link description here</a></p>

<p><a href="https://cloud.google.com/kubernetes-engine/docs/tutorials/http-balancer#remarks" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/tutorials/http-balancer#remarks</a></p>
