llm-wiki wiki · sources 2026-06-14

原文:raw/external-dns-architecture-analysis.md · 仓库:https://github.com/kubernetes-sigs/external-dns · 优先级 P0

一句话定位

ExternalDNS 从 Service、Ingress、Gateway 等 Kubernetes 对象动态维护外部 DNS records,是声明式网络控制器代表。

核心架构图

┌────────────────────────────────────────────────────────────────────────────┐
│ Kubernetes network objects                                                 │
│ Services, Ingresses, Gateways, and annotations describe desired DNS names. │
└────────────────────────────────────────────────────────────────────────────┘
                                       │
                                       ▼
┌────────────────────────────────────────────────────────────────────────────┐
│ external-dns controller                                                    │
│ Source readers build desired DNS records from Kubernetes object state.     │
└────────────────────────────────────────────────────────────────────────────┘
                                       │
                                       ▼
┌────────────────────────────────────────────────────────────────────────────┐
│ Ownership and providers                                                    │
│ Registry/TXT ownership plus adapters for Route53, Cloud DNS, and other     │
│ providers.                                                                 │
└────────────────────────────────────────────────────────────────────────────┘
                                       │
                                       ▼
┌────────────────────────────────────────────────────────────────────────────┐
│ Output                                                                     │
│ External DNS zones converge to the service endpoints represented in        │
│ Kubernetes.                                                                │
└────────────────────────────────────────────────────────────────────────────┘

模块分层

层 / 模块 职责
Sources service/ingress/gateway/istio/contour 等
Registry TXT ownership and conflict protection
Provider Route53/CloudDNS/Cloudflare 等 DNS API
Controller loop desired endpoints -> record changes

关键数据流

用户创建 Service/Ingress/Gateway
        │
        ▼
source 生成 DNS endpoints
        │
        ▼
registry 判断 ownership
        │
        ▼
provider apply record changes
        │
        ▼
外部 DNS 指向入口地址

设计决策与哲学