ExternalDNS for Managed Kubernetes
ExternalDNS Overview
ExternalDNS is a Kubernetes add-on that automates the management of public DNS records for Kubernetes resources, such as services and ingresses exposed outside the cluster. Unlike Kubernetes' internal DNS management, which is limited to internal cluster communication, ExternalDNS extends this functionality by delegating DNS record management to external DNS providers, such as IONOS Cloud DNS.
The ExternalDNS solution offers the following capabilities:
Empowers developers to manage DNS resources traditionally, which are handled manually by infrastructure teams.
Ensures that DNS records are synchronized with the current state of the Kubernetes cluster.
Automates the management of many DNS records, reducing manual effort.
Simplifies DNS management while improving security.
By integrating ExternalDNS with the IONOS webhook, you can manage your IONOS domains directly within your Kubernetes cluster. This integration requires an IONOS API key or token from the account managing your domains. The following tutorial provides detailed technical instructions for deploying ExternalDNS with the IONOS webhook using the Helm chart.
Deploy ExternalDNS on Managed Kubernetes
Follow these steps to set up ExternalDNS for your Managed Kubernetes with IONOS DNS Provider Cloud DNS:
Prepare domain name: You must first Create a DNS Zone for your domain name with Cloud DNS and then Connect Domain Name to Cloud DNS.
Add Helm chart: Add the external-dns Helm repository, which contains the official
external-dns
Helm chart.
Create a secret with: Create a Kubernetes secret to store your IONOS Cloud API token using the following command:
Create configuration: Create a Helm values file for the ExternalDNS Helm chart that includes the webhook configuration. In this example, the values file is called
external-dns-ionos-values.yaml
.
Install ExternalDNS: To install ExternalDNS with the helm chart, use the following commad:
Create application manifest: Execute the following command to create an echo server application manifest in the
echoserver_app.yaml
file.
Create echoserver namespace: Issue the following command to create a
echoserver
namespace:
Apply echo server application manifest: Execute the following command to apply the
Deployment
resource to your Kubernetes cluster:
You can check the pods of echoserver
deployment by running the following command:
Create service for echo server application: Use the following content to create a
Service
manifest in theechoserver-svc.yaml
file:
Apply service resource: Apply the
Service
resource to your Kubernetes cluster by running the following command:
Install NGINX Ingress Controller: Execute the following commands to install the NGINX ingress controller in your cluster:
Create Ingress resource: Using the following content, create a
Ingress
manifest in theechoserver-ingress.yaml
file:
Apply Ingress resource: Apply the
Ingress
resource to your Kubernetes cluster by running the following command:
Result: The deployment of ExternalDNS on Managed Kubernetes is complete.
Verify Deployment
You can verify that the application deployed is functioning as expected using one of the following options:
Access Application
Check that the echo server app runs on the subdomain you have specified by using the following command:
Result:
Check DNS Records
Check that the new A and TXT records are created by using the following command:
Last updated
Was this helpful?