1
Deploy ExternalDNS
Choose one of the following examples based on your DNS provide:Example for Cloudflare with API Token (Recommended)Example for Cloudflare with API KeyReference: https://kubernetes-sigs.github.io/external-dns/latest/docs/tutorials/cloudflare/
API tokens are more secure than API keys as they can be scoped to specific zones and permissions.
By default, ExternalDNS runs with the
upsert-only policy, which allows it to create and update DNS records but not delete them. To enable record deletion, change the policy to sync.--set policy=sync2
Annotate the Ingress Controller Service
The annotations you need depend on which ingress controller option you chose.Option 1 (Deployment with the LoadBalancer Service)
- Wildcard domains simplify DNS management for multiple applications.
- Eliminates the need to annotate each Ingress resource individually.
- DNS records are automatically updated when the Service’s
externalIPschange. - ExternalDNS monitors the LoadBalancer Service and creates DNS A records that point to the configured
externalIPs.
- The
endpoints-type=NodeExternalIPannotation instructs ExternalDNS to use the external IPs of nodes where the DaemonSet pods are running. - This results in DNS A records pointing to the external IPs of all worker nodes.
- DNS records are automatically updated as nodes are added to, or removed from, the cluster.