This is a webhook solver for cert-manager that allows you to use Bunny.net DNS for DNS01 ACME challenges.
- Automatic zone detection - no need to specify zone IDs
- Zone ID caching for improved performance
- Secure API key storage using Kubernetes secrets
- Kubernetes cluster with cert-manager installed
- Bunny.net account with DNS zones configured
- Bunny.net API key
Add the Helm repository:
helm repo add bunny-webhook https://dexxiez.github.io/cert-manager-webhook-bunny
helm repo updateInstall the webhook:
helm install bunny-webhook bunny-webhook/bunny-webhook --namespace cert-managerkubectl create secret generic bunny-credentials \
--from-literal=api-key=YOUR_BUNNY_API_KEY \
--namespace cert-managerCreate a cert-manager Issuer or ClusterIssuer that uses the Bunny.net webhook:
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: letsencrypt-bunny
namespace: default
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: [email protected]
privateKeySecretRef:
name: letsencrypt-bunny-account-key
solvers:
- dns01:
webhook:
groupName: acme.bunny.net
solverName: bunny
config:
apiKeySecretRef:
name: bunny-credentials
key: api-keyapiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: example-com
namespace: default
spec:
secretName: example-com-tls
issuerRef:
name: letsencrypt-bunny
dnsNames:
- example.com
- '*.example.com'The webhook accepts the following configuration:
apiKeySecretRef: Reference to a Kubernetes secret containing your Bunny.net API keyname: Name of the secretkey: Key within the secret that contains the API key
The webhook will automatically:
- Look up your Bunny.net DNS zones
- Find the appropriate zone for the domain being validated
- Create the required TXT record for ACME validation
- Clean up the TXT record after validation
All DNS providers must run the DNS01 provider conformance testing suite.
TEST_ZONE_NAME=example.com. make testYou'll need to configure the test environment with your Bunny.net credentials for the tests to pass.
Build the webhook container:
make buildThe webhook implements the cert-manager DNS01 challenge solver interface:
- Zone Detection: When a certificate is requested, the webhook queries the Bunny.net API to list all your DNS zones and finds the one matching your domain
- Zone Caching: Zone IDs are cached in memory to reduce API calls
- Record Creation: Creates a TXT record with the ACME challenge token
- Validation: cert-manager validates the challenge by checking the DNS record
- Cleanup: After validation, the webhook deletes the TXT record
See LICENSE file.
This webhook is based on the cert-manager webhook template.