apiVersion:cert-manager.io/v1 kind:ClusterIssuer metadata: name:letsencrypt-staging spec: acme: # You must replace this email address with your own. # Let's Encrypt will use this to contact you about expiring # certificates, and issues related to your account. email:user@example.com server:https://acme-staging-v02.api.letsencrypt.org/directory privateKeySecretRef: # Secret resource that will be used to store the account's private key. name:example-issuer-account-key # Add a single challenge solver, HTTP01 using nginx solvers: -http01: ingress: ingressClassName:nginx
apiVersion:networking.k8s.io/v1 kind:Ingress metadata: annotations: # add an annotation indicating the issuer to use. cert-manager.io/cluster-issuer:nameOfClusterIssuer name:myIngress namespace:myIngress spec: rules: -host:example.com http: paths: -pathType:Prefix path:/ backend: service: name:myservice port: number:80 tls:# < placing a host in the TLS config will determine what ends up in the cert's subjectAltNames -hosts: -example.com secretName:myingress-cert# < cert-manager will store the created certificate in this secret.
kubectl get Issuers,ClusterIssuers,Certificates,CertificateRequests,Orders,Challenges -n partner NAME READY AGE clusterissuer.cert-manager.io/letsencrypt-staging True 42h
NAME READY SECRET AGE certificate.cert-manager.io/myingress-cert False myingress-cert 42h
NAME APPROVED DENIED READY ISSUER REQUESTOR AGE certificaterequest.cert-manager.io/myingress-cert-1 True False letsencrypt-staging system:serviceaccount:cert-manager:cert-manager 11h
NAME STATE AGE order.acme.cert-manager.io/myingress-cert-1-1904933461 invalid 11h