<p>I have created a <a href="https://letsencrypt.org/docs/staging-environment/" rel="nofollow noreferrer">staging environment</a> with <a href="https://cert-manager.io/" rel="nofollow noreferrer">cert-manager</a> as the following: </p>

<pre><code>---
apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
  name: letsencrypt-staging
spec:
  acme:
    email: stage@example.io
    server: https://acme-staging-v02.api.letsencrypt.org/directory
    privateKeySecretRef:
      name: privateKeySecretRef
    solvers:
      - dns01:
          digitalocean:
            tokenSecretRef:
              name: digitalocean-dns
              key: access-token
        selector:
          dnsNames:
            - "*.dev.svc.databaker.io"
            - "*.stage.svc.databaker.io"
--- 
</code></pre>

<p>and have created a certifcate for the wildcard domain <code>*.dev.svc.databaker.io</code>: </p>

<pre><code>apiVersion: cert-manager.io/v1alpha2
kind: Certificate
metadata:
  name: dev-cert-staging
  namespace: dev
spec:
  secretName: secretName
  issuerRef:
    name: letsencrypt-staging
    kind: ClusterIssuer
  commonName: "*.dev.svc.databaker.io"
  dnsNames:
    - "*.dev.svc.databaker.io"
</code></pre>

<p>at the end, an ingress object:</p>

<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-staging
    kubernetes.io/ingress.class: nginx
    kubernetes.io/tls-acme: "true"
  name: dashboard
  namespace: dev
spec:
  rules:
  - host: dashboard.dev.svc.databaker.io
    http:
      paths:
      - backend:
          serviceName: dashboard
          servicePort: 80
        path: /
  tls:
  - hosts:
    - '*.dev.svc.databaker.io'
    secretName: secretName
</code></pre>

<p>When I call the page <a href="https://dashboard.dev.svc.databaker.io/" rel="nofollow noreferrer">https://dashboard.dev.svc.databaker.io/</a>, it shows me:</p>

<p><a href="https://i.stack.imgur.com/L3hlg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L3hlg.png" alt="enter image description here"></a></p>

<p>The question is, if it is right, that it shows an invalid certificate? </p>

softshipper
<p>It's right, staging is for testing certificate creation and has a very high limit on certificate issues.</p>

<p>Use production cert-issuer for even your dev environments but it's limited so make sure you're not spamming certs. </p>
