External DNS
Overview
External DNS is available as an add-on within Ankra's platform, providing automatic DNS record management across multi-cloud environments. With this add-on, DNS records are updated seamlessly without manual intervention, ensuring consistency and simplifying multi-cloud operations.
Configuration Options
The External DNS add-on offers several configurable inputs that allow you to customize the deployment to suit your cluster's needs. Below are the available inputs:
Inputs
-
Helm Release Name
This input sets the name of the Helm release for External DNS.- Default:
external-dns
Example:
helm_release_name: "external-dns"
- Default:
-
Helm Chart Version
This input sets the version of the External DNS Helm chart to deploy.- Default:
1.15.0
- Options:
1.15.0
(default)1.14.3
Example:
helm_chart_version: "1.15.0"
- Default:
-
Namespace
This input defines the namespace where External DNS will be deployed.- Default:
external-dns
Example:
namespace: "external-dns"
- Default:
-
Service Monitor Enabled
This input allows you to enable or disable the service monitor for Prometheus.- Default:
false
- Options:
true
false
(default)
Example:
service_monitor_enabled: "false"
- Default:
-
Provider
This input defines the DNS provider to be used for External DNS.- Default:
cloudflare
- Options:
cloudflare
Example:
provider: "cloudflare"
- Default:
-
Cloudflare API Email
This input defines the email address associated with the Cloudflare account.- Default:
""
Example:
cloudflare_api_email: "[email protected]"
- Default:
-
Cloudflare API Key Variable Name
This input specifies the name of the secret key containing the Cloudflare API key.- Default:
CLOUDFLARE_API_KEY
Example:
cloudflare_api_key_variable_name: "CLOUDFLARE_API_KEY"
- Default:
-
Log Level
This input sets the logging level for External DNS.- Default:
info
- Options:
info
(default)debug
error
fatal
Example:
log_level: "info"
- Default:
-
Policy
This input controls how DNS records are synchronized between sources and providers.- Default:
upsert-only
- Options:
sync
upsert-only
(default)
Example:
policy: "upsert-only"
- Default:
-
TXT Owner ID
This input sets the owner ID for the TXT records created by External DNS.- Default:
$CLUSTER_ID_SHORT
Example:
txt_owner_id: "$CLUSTER_ID_SHORT"
- Default:
Usage
Deploying External DNS
To deploy External DNS in your Kubernetes cluster using Ankra, follow these steps:
-
Access the Add-ons Section
In Ankra's platform, navigate to the Add-ons section and select External DNS from the list of available add-ons. -
Configure Inputs
You will be prompted to configure the following inputs:- Helm Release Name: Set the name for the Helm release.
- Helm Chart Version: Choose the version of External DNS to install.
- Namespace: Set the namespace for the deployment.
- Service Monitor Enabled: Optionally enable Prometheus service monitoring.
- Provider: Set the DNS provider (e.g., Cloudflare).
- Cloudflare API Email: Enter your Cloudflare account email.
- Cloudflare API Key Variable Name: Specify the variable name for the Cloudflare API key.
- Log Level: Set the logging level for External DNS.
- Policy: Choose how DNS records should be synchronized.
- TXT Owner ID: Set the owner ID for TXT records.
Example configuration:
helm_release_name: "external-dns"
helm_chart_version: "1.15.0"
namespace: "external-dns"
service_monitor_enabled: "false"
provider: "cloudflare"
cloudflare_api_email: "[email protected]"
cloudflare_api_key_variable_name: "CLOUDFLARE_API_KEY"
log_level: "info"
policy: "upsert-only"
txt_owner_id: "$CLUSTER_ID_SHORT" -
How to use External DNS
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: grafana-ingress
annotations:
external-dns.alpha.kubernetes.io/hostname: "grafana.example.com"
external-dns.alpha.kubernetes.io/ttl: "60"
external-dns.alpha.kubernetes.io/target: "a1b2c3d4e5f6.elb.amazonaws.com" # AWS ELB target
external-dns.alpha.kubernetes.io/cloudflare-proxied: "false" # No Cloudflare proxy, direct traffic