Installing NodeLocal DNS
NodeLocal DNS reduces the load from DNS requests by running a cache on every node in a Managed Service for Kubernetes cluster. This improves Managed Service for Kubernetes cluster performance and fault tolerance.
Getting started
Make sure that the security groups for the Managed Service for Kubernetes cluster and its node groups are configured correctly. If any rule is missing, add it.
Warning
The configuration of security groups determines the performance and availability of the cluster and the services and applications running in it.
Installation using Yandex Cloud Marketplace
- Go to the folder page and select Managed Service for Kubernetes.
- Click the name of the Managed Service for Kubernetes cluster and select the Marketplace
tab. - Under Applications available for installation, select NodeLocal DNS and click Use.
- Configure the application:
- Namespace: Select the
kube-system
namespace. - Application name: Specify the name for the application to be deployed in the Managed Service for Kubernetes cluster.
- Work with Cilium: Select this option if a cluster uses the Cilium network policy controller.
- Namespace: Select the
- Click Install.
- Wait for the application to change its status to
Deployed
.
After installing NodeLocal DNS, use the following values:
- Managed Service for Kubernetes cluster zone:
cluster.local
- NodeLocal DNS cache address:
169.254.20.10
- Application port for external queries:
53
- Port for collecting metrics in Prometheus format:
9253
Installation using a Helm chart
-
Install Helm
v3.7.0 or higher. -
To install a Helm chart
, from NodeLocal DNS, run the following command:export HELM_EXPERIMENTAL_OCI=1 &&\ helm pull oci://cr.yandex/yc-marketplace/k8s.gcr.io/node-local-dns/chart \ --version 1.5 \ --untar && \ KUBE_DNS_IP="$(kubectl get svc kube-dns -n kube-system -o jsonpath={.spec.clusterIP})" && \ helm install \ --set config.cilium=false \ --set config.clusterIp=$KUBE_DNS_IP \ node-local-dns ./chart/
For more information about local DNS caching, see Setting up NodeLocal DNS Cache.