Installing ExternalDNS with a plugin for Yandex Cloud DNS
ExternalDNS
Getting started
-
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the
--folder-name
or--folder-id
parameter. -
Create a service account for Cloud DNS.
-
Assign the
dns.editor
role to it. -
Create an authorized key for the service account in JSON format and save it to the
key.json
file:yc iam key create \ --service-account-name <service_account_name> \ --format json \ --output key.json
Installation using Yandex Cloud Marketplace
- Go to the folder page
and select Managed Service for Kubernetes. - Click the Managed Service for Kubernetes cluster name and select the
Marketplace tab. - Under Applications available for installation, select ExternalDNS with a plugin for Yandex Cloud DNS and click Use.
- Configure the application:
- Namespace: Select or create a namespace for ExternalDNS.
- Application name: Enter a name for the application.
- Service account key: Paste the contents of the
key.json
file or create a new authorized key for the service account. The service account must have thedns.editor
role. - Folder ID: Specify the folder hosting the Cloud DNS zone.
- Click Install.
- Wait for the application to change its status to
Deployed
.
Installation using a Helm chart
-
Install Helm
v3.7.0 or higher. -
Install kubectl
and configure it to work with the created cluster. -
To install a Helm chart
with ExternalDNS, run the following command:export HELM_EXPERIMENTAL_OCI=1 && \ helm pull oci://cr.yandex/yc-marketplace/yandex-cloud/externaldns/helm/externaldns \ --version 0.5.0 \ --untar && \ helm install \ --namespace <namespace> \ --create-namespace \ --set config.folder_id=<ID_of_folder_with_DNS_zone> \ --set-file config.auth.json=<path_to_file_with_authorized_service_account_key> \ externaldns ./externaldns/
Operation specifics
To automatically create DNS records using ExternalDNS with a plugin for Yandex Cloud DNS:
-
If you have an Ingress controller
installed, no additional setup is required. -
For LoadBalancer
services, use the"external-dns.alpha.kubernetes.io/hostname=<your_domain>"
annotation.To set the TTL of a DNS record, use the
"external-dns.alpha.kubernetes.io/ttl=<TTL_in_seconds>"
annotation.
Use cases
- Logging settings for Application Load Balancer Ingress controllers.
- Deploying and load testing a gRPC service with scaling.