Skip to main content
Use this page when you need to tune the webhook’s runtime settings or control Bunny-specific record behavior from your Kubernetes sources.

Runtime Environment Variables

The webhook reads all configuration from environment variables at startup.
VariableRequiredDefaultPurpose
BUNNY_API_KEYYesAPI key used to authenticate with the Bunny.net API
BUNNY_DRY_RUNNofalseWhen true, the provider logs intended changes but does not call the API
WEBHOOK_HOSTNolocalhostHost the webhook endpoint binds to
WEBHOOK_PORTNo8888Port the ExternalDNS controller calls
WEBHOOK_READ_TIMEOUTNo60sRead timeout for the webhook HTTP server
WEBHOOK_WRITE_TIMEOUTNo60sWrite timeout for the webhook HTTP server
HEALTH_HOSTNo0.0.0.0Host the health endpoint binds to
HEALTH_PORTNo8080Port for Kubernetes liveness and readiness probes
HEALTH_READ_TIMEOUTNo60sRead timeout for the health HTTP server
HEALTH_WRITE_TIMEOUTNo60sWrite timeout for the health HTTP server
Use BUNNY_DRY_RUN=true when you migrate existing records into ExternalDNS management. The logs show exactly which records the webhook would create, update, or delete — without changing Bunny.

Bunny-Specific Annotations

Add these annotations to the Kubernetes source (Service, Ingress, Gateway route, and similar) to control record behavior inside Bunny.net. All annotations are optional and fall back to safe defaults when omitted.

Record Controls

Disable a record

Set external-dns.alpha.kubernetes.io/webhook-bunny-disabled to true to keep the record managed by ExternalDNS but disabled in Bunny. Disabled records do not answer DNS queries but stay visible in the dashboard.
metadata:
  annotations:
    external-dns.alpha.kubernetes.io/hostname: api.example.com
    external-dns.alpha.kubernetes.io/webhook-bunny-disabled: "true"

Monitor type

Set external-dns.alpha.kubernetes.io/webhook-bunny-monitor-type to one of none, http, or ping to control Bunny’s built-in record monitoring. The default is none.
ValueBehavior
noneNo monitoring. Standard DNS record
httpHTTP health check against the record’s target
pingICMP ping check against the record’s target

Weight

Set external-dns.alpha.kubernetes.io/webhook-bunny-weight to an integer between 1 and 100 to control record weighting in Bunny. The default is 100.
Values outside the valid range are clamped to the nearest valid value. Non-integer values are rejected and the default is used instead.

Smart DNS Records

is supported on A and AAAA records. To model multiple smart records under the same hostname, create one Kubernetes source per record and differentiate them with external-dns.alpha.kubernetes.io/set-identifier. The webhook encodes the smart settings into SetIdentifier automatically when it reads back records from Bunny (latency:<zone> or geo:<lat>,<long>), so ExternalDNS sees a stable view across reconciles.

Routing type

Set external-dns.alpha.kubernetes.io/webhook-bunny-smart-type to none, latency, or geo. Unknown values fall back to none and the webhook logs a warning.

Latency routing

Required when smart-type=latency. Set external-dns.alpha.kubernetes.io/webhook-bunny-smart-latency-zone to a Bunny zone string — typically an ISO country or region code such as DE, US, or SG. Missing or empty values fall back to non-smart routing with a warning log.
Available Latency Regions
Bunny.net exposes the authoritative list through the public Region API. Use RegionCode values for the webhook-bunny-smart-latency-zone annotation.
curl https://api.bunny.net/region | jq '.[] | select(.AllowLatencyRouting) | .RegionCode'
The tables below are a snapshot from April 2026 of regions with AllowLatencyRouting: true. Regions without latency routing are intentionally omitted. For changes, query the API above.
Region CodeNameCountry
AMSAmsterdamNL
ATViennaAT
AT2Vienna 2AT
BANovi TravnikBA
BEBrusselsBE
BGSofiaBG
BUBucharestRO
CHZurichCH
CZPragueCZ
DDDusseldorfDE
DEFrankfurtDE
DE2Frankfurt 2DE
DKCopenhagenDK
ESMadridES
FIHelsinkiFI
FRParisFR
GRAthensGR
HRZagrebHR
HUBudapestHU
IEDublinIE
ISKeflavikIS
ITMilanIT
KHKhabarovskRU
KYKrasnoyarskRU
LJLjubljanaSI
LTVilniusLT
LULuxembourgLU
LVRigaLV
MDChisinauMD
MSMarseilleFR
NOOsloNO
PLWarsawPL
PTLisbonPT
RSBelgradeRS
RUMoscowRU
SEStockholmSE
SKBratislavaSK
UAKyivUA
UKLondonGB
Region CodeNameCountry
ASBAshburn, VAUS
BOBoston, MAUS
CATorontoCA
CLTCharlotte, NCUS
DENDenver, COUS
DEN2Denver 2, COUS
GAAtlanta, GAUS
GA2Atlanta 2, GAUS
HIHonolulu, HIUS
HOUHouston, TXUS
HOU2Houston 2, TXUS
ILChicago, ILUS
KCKansas City, MOUS
LALos Angeles, CAUS
LA2Los Angeles 2, CAUS
MIMiami, FLUS
MI2Miami 2, FLUS
MNMontrealCA
MSPMinneapolis, MNUS
NYNew York City, NYUS
OGOgden, UTUS
PBPittsburgh, PAUS
PHXPhoenix, AZUS
SILSan Jose, CAUS
TXDallas, TXUS
VAVancouverCA
WASeattle, WAUS
Region CodeNameCountry
AMYerevanAM
AZBakuAZ
BDDhakaBD
CENChennaiIN
CYNicosiaCY
GEOTbilisiGE
GUHagatnaGU
HKHong KongHK
IDJakartaID
INBangaloreIN
ISRTel AvivIL
JPTokyoJP
KGBishkekKG
KRSeoulKR
KZAlmatyKZ
MGUlaanbaatarMN
MUMumbaiIN
MYKuala LumpurMY
NDNew DelhiIN
NPKathmanduNP
PHManilaPH
PKKarachiPK
PPPhnom PenhKH
RGNYangonMM
SGSingaporeSG
SG2Singapore 2SG
THBangkokTH
TRIstanbulTR
TWTaipeiTW
VNHo Chi MinhVN
Region CodeNameCountry
ADLAdelaideAU
AUCAucklandNZ
BRBBrisbaneAU
MELMelbourneAU
PERPerthAU
SYDSydneyAU
Region CodeNameCountry
ARBuenos AiresAR
BOLSucreBO
BRSao PauloBR
BSBrasiliaBR
CLSantiagoCL
COBogotaCO
CRSan PedroCR
ECQuitoEC
FOFortalezaBR
GTGuatemalaGT
LAPLa PazBO
MXMexico CityMX
PAPorto AlegreBR
PELimaPE
PRSan JuanPR
RJRio de JaneiroBR
Region CodeNameCountry
AEDubaiAE
AOLuandaAO
BHRBahrainBH
CTCape TownZA
EGCairoEG
EG2Cairo 2EG
FUFujairahAE
IQBaghdadIQ
IQ2Baghdad 2IQ
JHJohannesburgZA
JOAmmanJO
KENairobiKE
KWIKuwait CityKW
NGLagosNG
RBARabatMA
RIRiyadhSA
TNTunisTN

Geographic routing

Required when smart-type=geo. Set both coordinate annotations:
  • external-dns.alpha.kubernetes.io/webhook-bunny-smart-geo-lat — latitude between -90 and 90
  • external-dns.alpha.kubernetes.io/webhook-bunny-smart-geo-long — longitude between -180 and 180
Out-of-range or unparseable coordinates fall back to non-smart routing with a warning log.

Example: latency routing across regions

# Service in the EU cluster
apiVersion: v1
kind: Service
metadata:
  name: api-eu
  annotations:
    external-dns.alpha.kubernetes.io/hostname: api.example.com
    external-dns.alpha.kubernetes.io/set-identifier: eu
    external-dns.alpha.kubernetes.io/webhook-bunny-smart-type: latency
    external-dns.alpha.kubernetes.io/webhook-bunny-smart-latency-zone: "DE"
---
# Service in the US cluster
apiVersion: v1
kind: Service
metadata:
  name: api-us
  annotations:
    external-dns.alpha.kubernetes.io/hostname: api.example.com
    external-dns.alpha.kubernetes.io/set-identifier: us
    external-dns.alpha.kubernetes.io/webhook-bunny-smart-type: latency
    external-dns.alpha.kubernetes.io/webhook-bunny-smart-latency-zone: "US"

Interaction With Dashboard-Managed Records

If you manually created a smart record in the Bunny.net dashboard and there is no matching Kubernetes source with the smart annotations, ExternalDNS detects drift and tries to strip the smart settings on the next reconcile.
To avoid unwanted changes, pick one of:
  • add matching smart annotations to a Kubernetes source so the webhook treats the record as managed
  • exclude the record from ExternalDNS management through the ownership TXT registry so the controller does not consider it its own

Troubleshooting

Check the webhook container logs first:
kubectl -n external-dns logs deploy/external-dns -c webhook
Common causes: missing or invalid BUNNY_API_KEY, an ExternalDNS domainFilters value that does not match the hostname, or policy: sync required for deletions that is not set on the chart.
Check that the BUNNY_API_KEY environment variable is wired from a valid secret and that the secret exists in the same namespace as the ExternalDNS release.
Unknown smart-type values, missing latency-zone, and out-of-range coordinates all fall back to non-smart routing with a warning log. Look for a warning entry in the webhook logs to confirm which annotation was rejected.