Closed TheDarkula closed 11 months ago
Hello @TheDarkula, if you copied the example as-is, then the caBundle
value will be invalid (it expects a base64 encoded CA certificate). The example should probably leave that commented-out by default to prevent this.
If you don't need to use a custom CA Cert, then you can just comment out that setting.
@zachomedia Ah, I understand, thank you!
Commenting that out did lead to another error, though:
1 controller.go:167] "cert-manager/challenges: re-queuing item due to error processing" err="failed loading existing records for _acme-challenge.example.com. in domain example.com.: failed loading zone example.com.: Get \"http://internal.svc.cluster.local:8081/api/v1/servers/localhost/zones/example.com.\": net/http: invalid header field value for \"X-Api-Key\"" key="default/test-example-ca-5mdzv-1016260727-365178633"
I would check that the secret containing the API key is correctly configured.
Secret
objectapiKeySecretRef
points to the right secret and keyFor the secret, I did echo "api_key_here" | base64
, and replaced APIKEY_BASE64
below:
apiVersion: v1
kind: Secret
metadata:
name: pdns-api-key
namespace: default
type: Opaque
data:
key: APIKEY_BASE64
In the issuer, I have this:
apiKeySecretRef:
name: pdns-api-key
namespace: default
key: key
Try echo -n "API KEY"
, I'm guessing there is a new line at the end of the API key
Great catch! All is well now :)
@zachomedia I hit a bit of curiosity. I successfully added certificates for a handful of domains, but today, I am unable to:
controller.go:167] "cert-manager/challenges: re-queuing item due to error processing" err="zone com. may not be edited per config (allowed zones are [example.com.])" key="servicename/servicename-example-com-tls-5zszl-3352830494-2876302178"
util.go:83] "cert-manager/controller/certificaterequests-issuer-acme/handleOwnedResource: owning resource not found in cache" resource_name="servicename-example-com-tls-5zszl-3352830494" resource_namespace="servicename" resource_kind="Order" resource_version="v1" related_resource_namespace="servicename" related_resource_name="servicename-example-com-tls-5zszl" related_resource_kind="CertificateRequest"
controller.go:165] "cert-manager/orders: order in work queue no longer exists" err="order.acme.cert-manager.io \"servicename-example-com-tls-5zszl-3352830494\" not found"
util.go:83] "cert-manager/controller/orders/handleOwnedResource: owning resource not found in cache" resource_name="servicename-example-com-tls-5zszl-3352830494-2876302178" resource_namespace="servicename" resource_kind="Challenge" resource_version="v1" related_resource_namespace="servicename" related_resource_name="servicename-example-com-tls-5zszl-3352830494" related_resource_kind="Order"
sync.go:282] "cert-manager/challenges/finalizer: error cleaning up challenge" err="failed loading existing records for _acme-challenge.servicename.example.com. in domain com.: failed loading zone com.: Not Found" resource_name="servicename-example-com-tls-5zszl-3352830494-2876302178" resource_namespace="servicename" resource_kind="Challenge" resource_version="v1" dnsName="servicename.example.com" type="DNS-01"
util.go:83] "cert-manager/controller/orders/handleOwnedResource: owning resource not found in cache" resource_name="servicename-example-com-tls-5zszl-3352830494-2876302178" resource_namespace="servicename" resource_kind="Challenge" resource_version="v1" related_resource_namespace="servicename" related_resource_name="servicename-example-com-tls-5zszl-3352830494" related_resource_kind="Order"
Also, looking in the powerdns logs shows no errors.
@TheDarkula You have zone restrictions on the Issuer config (again probably should be commented out in the example) so it's refusing to set the DNS records.
Either update or remove the allowed-zones
setting.
I had that thought as well.
With the allowed-zones
section commented out, it shows this:
err="failed loading existing records for _acme-challenge.servicename.example.com. in domain com.: failed loading zone com.: Not Found"
The thing that is confusing is that it was working, and I did not change the ClusterIssuer
.
It's weird that it's trying to update com.
, that would typically mean that cert-manager didn't find a SOA record for example.com
.
I would debug this in cert manager since it passes on to the webhook what zone to update. https://cert-manager.io/docs/troubleshooting/acme/
From the powerdns logs when I try to issue a certificate:
"GET /api/v1/servers/localhost/zones/com. HTTP/1.1" 404 114
As ever, split-horizon DNS is difficult. The issue was having a wildcard A record in my recursive DNS server, which was removing the SOA record from the authoritative server. Thank you so much for the help again!
Also, thank you for your work on this project :)
I'm glad to hear you were able to sort it out!
I worked through the example in the readme, but after applying the yaml files, the cert-manager pod logs show this: