<p>I am trying to get ingress with cert-manager v0.16.0 working for let's encrypt certs. I use microk8s and have followed a couple of tutorials, none of them let me to the goal.</p>
<p>With this <a href="https://www.thinktecture.com/de/kubernetes/ssl-certificates-with-cert-manager-in-kubernetes/" rel="nofollow noreferrer">tutorialLink</a> I am stuck at creating the Issuer and get an error message when trying to apply it:</p>
<pre><code>kc apply -f clusterIssuer.yaml
namespace/cloud unchanged
Error from server (InternalError): error when creating &quot;clusterIssuer.yaml&quot;: Internal error occurred: failed calling webhook &quot;webhook.cert-manager.io&quot;: Post &quot;https://certmgr-cert-manager-webhook.cert-manager.svc:443/mutate?timeout=10s&quot;: service &quot;certmgr-cert-manager-webhook&quot; not found
</code></pre>
<p>The service can not be found, because this is not its name. Tries to find: certmgr-cert-manager-webhook, but the services name is: cert-manager-webhook. There is also not dns alias or anything that would justify that. The deployment, which create cert-manager and the webhook is this:</p>
<p><a href="https://github.com/jetstack/cert-manager/releases/download/v0.16.0/cert-manager.yaml" rel="nofollow noreferrer">cert-manager-0.16.0.yaml</a></p>
<p>If I change the type of the issuer from ClusterIssuer to Issuer I got:</p>
<pre><code>kc apply -f clusterIssuer.yaml
namespace/git created
error: unable to recognize &quot;clusterIssuer.yaml&quot;: no matches for kind &quot;Issuer&quot; in version &quot;cert-manager.io/v1&quot;
</code></pre>
<p>Some debugging help wold be greatly appreciated.</p>
<p>--- Some more info
clusterIssuer.yaml:</p>
<pre><code>    kind: Namespace
apiVersion: v1
metadata:
  name: cloud
---
apiVersion: cert-manager.io/v1beta1
kind: Issuer
metadata:
  name: letsencrypt-staging
  namespace: cloud
spec:
  acme:
    # Staging API
    server: https://acme-staging-v02.api.letsencrypt.org/directory
    email: mail@mail.de
    privateKeySecretRef:
      name: cloud-account-key-staging
    solvers:
    - http01:
       ingress:
         class: nginx
</code></pre>

user637338
<p>Looks like cert-manager is not properly set with the CRD, you can try deleting and setting up cert-manager from official documentation once : <a href="https://cert-manager.io/docs/installation/kubernetes/" rel="noreferrer">https://cert-manager.io/docs/installation/kubernetes/</a></p>
<p>You can directly set the latest version, this single YAML contains everything CRD, deployment, svc :</p>
<pre><code>kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.3.0/cert-manager.yaml
</code></pre>
<p>Once YAML is applied you can check the deployment</p>
<pre><code>kubectl get pods -n cert-manager
</code></pre>
<p>if everything running fine you can apply the configuration of cluster issuer and ingress to get the SSL/TLS certificate which will get stored into the Kubernetes secret.</p>
<p>here a simple and proper example of <strong>Clusterissuer</strong> and <strong>ingress</strong> YAML (do note you were trying with staging API <a href="https://acme-staging-v02.api.letsencrypt.org/directory" rel="noreferrer">https://acme-staging-v02.api.letsencrypt.org/directory</a>  if possible use the production server address so it proper with all browsers)</p>
<pre><code>apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
  name: cluster-issuer-name
  namespace: development
spec:
  acme:
    server: https://acme-v02.api.letsencrypt.org/directory
    email: harsh@example.com
    privateKeySecretRef:
      name: secret-name
    solvers:
    - http01:
        ingress:
          class: nginx-class-name
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx-class-name
    cert-manager.io/cluster-issuer: cluster-issuer-name
    nginx.ingress.kubernetes.io/rewrite-target: /
  name: example-ingress
spec:
  rules:
  - host: sub.example.com
    http:
      paths:
      - path: /api
        backend:
          serviceName: service-name
          servicePort: 80
  tls:
  - hosts:
    - sub.example.com
    secretName: secret-name
</code></pre>
