title: How to replace the "Kubernetes fake certificate" with a wildcard certificate (on bare metal private cloud) Nginx Ingress and cert manager
body: <p>We have setup a Kubernetes cluster on our bare metal server.</p>
  <p>We deploy our application where each namespace is an application for the end customer. ie customer1.mydomain.com -&gt; namespace: cust1</p>
  <p>We keep on getting the Kubernetes Ingress Controller Fake Certificate.</p>
  <p>We have purchased our own wildcard certificates *.mydomain.com</p>
  <pre><code>#kubectl create secret tls OUR-SECRET --key /path/private.key --cert /path/chain.crt -n ingress-nginx
  #kubectl create secret tls OUR-SECRET --key /path/private.key --cert /path/chain.crt -n kube-system
  </code></pre>
  <p>ingress.yaml</p>
  <pre><code>apiVersion: certmanager.k8s.io/v1alpha1  
  kind: Certificate  
  metadata:  
    name: ourcloud
    namespace: cert-manager
  spec:  
    secretName: oursecret
    issuerRef:
      name: letsencrypt-prod
    commonName: '*.mydomain.com'
    acme:
      config:
      - dns01:
          provider: cf-dns-prod
        domains:
        - '*.mydomain.com'
  
  kubectl apply -f ingress.yaml
  certificate.certmanager.k8s.io/ourcloud created
  </code></pre>
  <p><a href="https://cust1.mydomain.com" rel="nofollow noreferrer">https://cust1.mydomain.com</a> connects with Kubernetes Ingress Controller Fake Certificate</p>