cert-manager

cert-manager: Failed to register ACME account: invalid character '<' looking for beginning of value


I installed the cert-manager using the Helm Chart. I created a ClusterIssuer but I see that it's on a failed state:

kubectl describe clusterissuer letsencrypt-staging
ErrRegisterACMEAccount Failed to register ACME account: invalid character '<' looking for beginning of value

What could be causing this invalid character '<'?


Solution

  • This error is most likely the result of an incorrect server url, the url you specified is returning HTML (hence the complain about <).

    Make sure that your server url is https://acme-staging-v02.api.letsencrypt.org/directory" and NOT just https://acme-staging-v02.api.letsencrypt.org/", the /directory must be included in the url.

    So the ClusterIssuer should look like this (emphasis on the .spec.acme.server)

    kind: ClusterIssuer
    metadata:
      name: letsencrypt-staging
    spec:
      acme:
        email: name.surname@mycompany.com
        privateKeySecretRef:
          name: letsencrypt-staging
        server: https://acme-staging-v02.api.letsencrypt.org/directory
        solvers:
        - dns01:
            route53:
              hostedZoneID: XXXXXXXXXXXXXX
              region: eu-north-1
          selector:
            dnsZones:
            - xxx.yyy.mycompany.com