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
External-DNS manages DNS records dynamically based on Kubernetes resources like Services and Ingresses. Emitting Kubernetes Events provides a lightweight, observable way for users and systems to understand what External-DNS is doing, especially in production environments where DNS correctness is essential.
4
+
5
+
> Note; events is currently alpha feature. Functionality is limited and subject to change
6
+
7
+
## ✨ Why Events Matter
8
+
9
+
Kubernetes Events enable External-DNS to provide real-time feedback to users and controllers, complementing logs with a simpler way to track DNS changes. This enhances debugging, monitoring, and automation around DNS operations.
|**DNS Record Visibility**| Events show what DNS records were created, updated, or deleted (e.g., `Created A record "api.example.com"`). |
16
+
|**Developer Feedback**| Users deploying Ingresses or Services can see if External-DNS processed their resource. |
17
+
|**Surface Errors, Debugging and Troubleshooting**| Easily identify resource misannotations, sync failures, or IAM permission issues. |
18
+
|**Error Reporting**| Emit warning events when record sync fails due to provider issues, duplicate records, or misconfigurations. |
19
+
|**Integration with Alerting/Automation/Auditing**| This enables automated remediation or notifications when DNS sync fails or changes unexpectedly. |
20
+
|**Observability**| Trace why a DNS record wasn’t created. |
21
+
|**Alerting/automation**| Trigger actions based on failed events. |
22
+
|**Operator and Developer feedback**| It removes the black-box feeling of "I deployed an Ingress, but why doesn’t the DNS work?" |
23
+
24
+
## Consuming Events
25
+
26
+
You can observe External-DNS events using:
27
+
28
+
```sh
29
+
kubectl describe service <name>
30
+
kubectl get events --field-selector involvedObject.kind=Service
31
+
kubectl get events --field-selector type=Normal|Warning
32
+
kubectl get events --field-selector reason=RecordReady|RecordDeleted|RecordError
33
+
kubectl get events --field-selector action=Created|Updated|Deleted|FailedSync
34
+
kubectl get events --field-selector reportingComponent=external-dns
35
+
```
36
+
37
+
Or integrate with tools like:
38
+
39
+
- Prometheus (via event exporters)
40
+
- Loki/Fluentd for log/event aggregation
41
+
- Argo CD / Flux for GitOps monitoring
42
+
43
+
### Practices for Understanding Events
44
+
45
+
-**Action field**: Events include a short label describing the `Action`, such as `Created`, `Updated`, `Deleted`, or `FailedSync`
46
+
-**Reason field**: Events include a short label `Reason` is why the action was taken, such as `RecordReady`, `RecordDeleted`, or `RecordError`.
47
+
-**Type field**:
48
+
-`Normal` means the operation succeeded (e.g., a DNS record was created).
49
+
-`Warning` indicates a problem (e.g., DNS sync failed due to configuration or provider issues).
50
+
-**Linked** resource: Events are attached to the relevant Kubernetes resource (like an `Ingress` or `Service`), so you can view them with tools like `kubectl describe`.
51
+
-**Event noise**: If you see repeated identical events, it may indicate a misconfiguration or an issue worth investigating.
52
+
53
+
### Caveats
54
+
55
+
- Events are ephemeral (default retention is ~1 hour).
56
+
- They are best-effort and not guaranteed to be delivered or stored long-term.
57
+
- Not a substitute for logging or metrics, but complementary.
58
+
59
+
## Supported Sources
60
+
61
+
Events are emitted for all sources that External-DNS supports. The following table lists the sources and whether they currently emit events.
62
+
If a source does not emit events, it may in the future.
Copy file name to clipboardExpand all lines: docs/flags.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,7 @@
52
52
|`--target-net-filter=TARGET-NET-FILTER`| Limit possible targets by a net filter; specify multiple times for multiple possible nets (optional) |
53
53
|`--[no-]traefik-enable-legacy`| Enable legacy listeners on Resources under the traefik.containo.us API Group |
54
54
|`--[no-]traefik-disable-new`| Disable listeners on Resources under the traefik.io API Group |
55
+
|`--events-emit=EVENTS-EMIT`| Events that should be emitted. (optional, default: none, expected: RecordReady, RecordDeleted, RecordError) |
55
56
|`--provider=provider`| The DNS provider where the DNS records will be created (required, options: akamai, alibabacloud, aws, aws-sd, azure, azure-dns, azure-private-dns, civo, cloudflare, coredns, digitalocean, dnsimple, exoscale, gandi, godaddy, google, inmemory, linode, ns1, oci, ovh, pdns, pihole, plural, rfc2136, scaleway, skydns, transip, webhook) |
56
57
|`--provider-cache-time=0s`| The time to cache the DNS provider record list requests. |
57
58
|`--domain-filter=`| Limit possible target zones by a domain suffix; specify multiple times for multiple domains (optional) |
app.Flag("traefik-enable-legacy", "Enable legacy listeners on Resources under the traefik.containo.us API Group").Default(strconv.FormatBool(defaultConfig.TraefikEnableLegacy)).BoolVar(&cfg.TraefikEnableLegacy)
491
491
app.Flag("traefik-disable-new", "Disable listeners on Resources under the traefik.io API Group").Default(strconv.FormatBool(defaultConfig.TraefikDisableNew)).BoolVar(&cfg.TraefikDisableNew)
492
492
493
-
app.Flag("events-emit", "Events that should be emitted. (optional, default: none, expected: RecordReady, RecordError)").Default(defaultConfig.EmitEvents...).StringsVar(&cfg.EmitEvents)
493
+
app.Flag("events-emit", "Events that should be emitted. (optional, default: none, expected: RecordReady, RecordDeleted, RecordError)").Default(defaultConfig.EmitEvents...).StringsVar(&cfg.EmitEvents)
0 commit comments