cert-manager creating certificate but not showing up from kubectl get certificate

1/17/2021

I'm trying to set up cert-manager for m kubernetes cluster in Digitalocean.

after installing cert-manager and it making sure the services are running I make my issuer:

staging-issuer:

apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
 name: letsencrypt-staging
 namespace: cert-manager
spec:
 acme:
   # The ACME server URL
   server: https://acme-staging-v02.api.letsencrypt.org/directory
   # Email address used for ACME registration
   email: myemail@mail.com
   # Name of a secret used to store the ACME account private key
   privateKeySecretRef:
     name: letsencrypt-staging
   # Enable the HTTP-01 challenge provider
   solvers:
   - http01:
       ingress:
         class:  nginx

Then in my ingress I add it as follows:

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: isildur-ingress
  annotations:
    cert-manager.io/cluster-issuer: "letsencrypt-staging"
spec:
  tls:
    - hosts:
      - auth-svc.url.com
      - email-service.url.com
      secretName: name-secret-tls
  rules:
  - host: email-service.url.com
    http:
      paths:
      - backend:
          serviceName: email-service
          servicePort: 3000
  - host: auth-svc.url.com
    http:
      paths:
      - backend:
          serviceName: auth-svc
          servicePort: 3000
        

Getting output from my ingress with kubectl describe ingress:

  Normal  CreateCertificate  58s                cert-manager              Successfully created Certificate "name-secret-tls"

But then when I try and get the cert with kubectl get certificate: No resources found in default namespace. . Adding --all-namespaces doesn't show anything either.

-- Gurkmeja101
cert-manager
kubernetes
nginx-ingress
ssl

1 Answer

1/17/2021

I found the issue. Gitlab had installed their cert-manager and it was conflicting with the one I had installed manually.

-- Gurkmeja101
Source: StackOverflow