You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Controls whether load balancer hostname targets when they are CNAME records. When the annotation is set to `"true"` the CNAME records are resolved to their underlying
305
+
A/AAAA records at sync time, ExternalDNS performs a DNS lookup for each hostname target and emits the
306
+
resulting IP addresses as A and/or AAAA endpoints. If resolution fails (e.g. the hostname is
307
+
temporarily unresolvable), that target is silently skipped.
308
+
309
+
This is useful when a DNS provider does not support CNAME flattening
310
+
or ALIAS records and a flat IP address record is required.
311
+
312
+
### Use Cases for `external-dns.alpha.kubernetes.io/resolve-target` annotation
313
+
314
+
#### Opt in to resolution for a single Source
315
+
316
+
Resolve load balancer hostnames to IPs for one Ingress:
> ExternalDNS will resolve the Ingress load balancer hostname and publish A/AAAA records instead of a CNAME.
345
+
Let's take an example, "example.com" CNAME resolves to A record "104.20.23.154" and AAAA record "2606:4700:10::ac42:93f3".
346
+
ExternalDNS will create an A record for "svc.example.com" with target "104.20.23.154" and an AAAA record for "svc.example.com" with target "2606:4700:10::ac42:93f3".
347
+
302
348
## external-dns.alpha.kubernetes.io/target
303
349
304
350
Specifies a comma-separated list of values to override the resource's DNS record targets (RDATA).
@@ -420,9 +466,9 @@ spec:
420
466
## Gateway API Annotation Placement
421
467
422
468
When using Gateway API sources (`gateway-httproute`, `gateway-grpcroute`, `gateway-tlsroute`, etc.), annotations
423
-
are read from different resources: **Gateway resource** reads only `target` annotation, while **Route resources**
424
-
(HTTPRoute, GRPCRoute, TLSRoute, etc.) read all other annotations (`hostname`, `ttl`, `controller`, and
425
-
provider-specific annotations like `cloudflare-*`, `aws-*`, `scw-*`).
469
+
are read from different resources: **Gateway resource** reads only the `target` annotation, while **Route resources**
470
+
(HTTPRoute, GRPCRoute, TLSRoute, etc.) read all other annotations (`hostname`, `ttl`, `controller`,
471
+
`resolve-target`, and provider-specific annotations like `cloudflare-*`, `aws-*`, `scw-*`).
426
472
427
473
**ListenerSet resources** also support the `target` annotation. When a Route references a ListenerSet
428
474
as its parent, the ListenerSet's target annotation takes precedence over the parent Gateway's target annotation.
@@ -57,6 +58,12 @@ Converts IPv4 targets to IPv6 using NAT64 prefixes.
57
58
--nat64-prefix=64:ff9b::/96
58
59
```
59
60
61
+
### 2.2 `ResolveTarget`
62
+
63
+
Resolves `CNAME` targets to concrete IP targets when the endpoint has the `resolve-target` provider-specific property set to `true`. If all target resolutions fail, the endpoint is skipped.
64
+
65
+
📌 **Use case**: A Service or Gateway exposes a load balancer hostname (for example, `xxx.elb.amazonaws.com`), but the desired DNS output should be `A`/`AAAA` records rather than a `CNAME`.
66
+
60
67
### 3.1 `PostProcessor`
61
68
62
69
Applies post-processing to all endpoints after they are collected from sources.
@@ -116,6 +123,7 @@ Wrappers are often composed like this:
0 commit comments