User Tools

Site Tools


external-dns

External-DNS

External-DNS is a Kubernetes addon that synchronizes exposed Kubernetes Services and Ingresses with DNS providers. It enables you to dynamically manage DNS records for your Kubernetes services, making them accessible from outside the cluster using human-readable domain names.

Key Features

  • **Synchronization with DNS Providers:** External-DNS connects to various DNS providers, such as AWS Route 53, Google Cloud DNS, Azure DNS, and many others. It automatically creates, updates, and deletes DNS records based on the state of your Kubernetes services and ingresses.
  • **Support for Multiple Resource Types:** External-DNS can manage DNS records for Services, Ingresses, and other Kubernetes resources that expose endpoints.
  • **Customizable Record Types:** It supports various DNS record types, including A, AAAA, CNAME, and TXT records, providing flexibility in how you expose your services.
  • **Annotation-Based Configuration:** External-DNS relies on annotations on Kubernetes resources to define the desired DNS records, making configuration straightforward and declarative.
  • **High Availability:** It can be deployed in a highly available configuration to ensure continuous synchronization of DNS records.

Benefits

  • **Simplified DNS Management:** External-DNS automates the creation and management of DNS records for your Kubernetes services, eliminating manual configuration and reducing errors.
  • **Improved Service Discovery:** By creating DNS records for your services, External-DNS makes them easily discoverable by external clients and systems.
  • **Enhanced User Experience:** Users can access your Kubernetes services using familiar domain names instead of IP addresses, improving the overall user experience.
  • **Flexibility:** Its support for various DNS providers and resource types offers flexibility in how you expose your services.

Code Examples

While External-DNS configuration primarily involves annotations on Kubernetes resources, here's an example of a Service with an External-DNS annotation:

```yaml apiVersion: v1 kind: Service metadata:

 name: my-service
 annotations:
   external-dns.alpha.kubernetes.io/hostname: my-service.example.com
spec:
 selector:
   app: my-app
 ports:
 - protocol: TCP
   port: 80
   targetPort: 8080
```

This annotation tells External-DNS to create an A record for `my-service.example.com` pointing to the external IP address of the service.

Additional Resources

external-dns.txt · Last modified: 2024/08/28 15:46 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki