A chart to install node-local-dns.
NodeLocal DNSCache improves Cluster DNS performance by running a DNS caching agent on cluster nodes as a DaemonSet.
In today's architecture, Pods in 'ClusterFirst' DNS mode reach out to a kube-dns serviceIP for DNS queries. This is translated to a kube-dns/CoreDNS endpoint via iptables rules added by kube-proxy. With this new architecture, Pods will reach out to the DNS caching agent running on the same node, thereby avoiding iptables DNAT rules and connection tracking. The local caching agent will query kube-dns service for cache misses of cluster hostnames ("cluster.local" suffix by default).
Further documentation is here
This helm chart works for both kube-proxy setups (iptables or ipvs).
A simple install with default values, latest chart version and generated name:
helm install --generate-name oci://ghcr.io/deliveryhero/helm-charts/node-local-dnsTo install a specific version of this chart:
helm install --generate-name oci://ghcr.io/deliveryhero/helm-charts/node-local-dns --version 2.9.2To install the chart with the release name my-release:
helm install my-release oci://ghcr.io/deliveryhero/helm-charts/node-local-dnsTo install with some set values:
helm install my-release oci://ghcr.io/deliveryhero/helm-charts/node-local-dns --set values_key1=value1 --set values_key2=value2To install with custom values file:
helm install my-release oci://ghcr.io/deliveryhero/helm-charts/node-local-dns -f values.yaml| Key | Type | Default | Description |
|---|---|---|---|
| affinity | object | {} |
|
| config.bindIp | bool | false |
If false, it will bind 0.0.0.0, otherwise dnsServer and localDns will be used. bottlerocket-os/bottlerocket#3711 (comment) |
| config.cacheTTL | int | 30 |
Cache TTL in seconds for DNS records. https://coredns.io/plugins/cache/ |
| config.commProtocol | string | "force_tcp" |
Set communication protocol. Options are prefer_udp or force_tcp |
| config.customConfig | string | "" |
Overrides the generated configuration with specified one. |
| config.customUpstreamsvc | string | "" |
Use a custom upstreamsvc for -upstreamsvc |
| config.dnsDomain | string | "cluster.local" |
Internal k8s DNS domain |
| config.dnsServer | string | "172.20.0.10" |
Main coredns service (kube-dns) ip, used on iptables-mode. |
| config.enableLogging | bool | false |
Set boolean to log DNS requests |
| config.extraServerBlocks | string | "" |
Add extra server blocks to the generated configuration. |
| config.healthPort | int | 8080 |
Port used for the health endpoint |
| config.localDns | string | "169.254.20.25" |
|
| config.noIPv6Lookups | bool | false |
If true, return NOERROR when attempting to resolve an IPv6 address |
| config.port.number | int | 53 |
Port used for DNS traffic |
| config.port.tcp | string | "dns-tcp" |
Port name used for TCP DNS traffic |
| config.port.udp | string | "dns" |
Port name used for UDP DNS traffic |
| config.prefetch | object | {"amount":3,"duration":"30s","enabled":false,"percentage":"20%"} |
If enabled, coredns will prefetch popular items when they are about to be expunged from the cache. https://coredns.io/plugins/cache/ |
| config.serveStale | object | {"duration":"1h","enabled":false,"mode":"verify"} |
If enabled, coredns will serve stale cache entries while fetching fresh ones in the background. https://coredns.io/plugins/cache/ |
| config.setupInterface | bool | true |
|
| config.setupIptables | bool | true |
|
| config.skipTeardown | bool | false |
|
| config.upstreamForwardConfig | object | {} |
Allows for configuration of upstream server forwarding for the default server block |
| config.upstreamServers | string | "__PILLAR__UPSTREAM__SERVERS__" |
Overrides the upstream servers used for default server block |
| config.upstreamServiceSelector | object | {"k8s-app":"kube-dns"} |
Use a custom upstream service selector |
| configMapAnnotations | object | {} |
|
| configMapLabels | object | {} |
|
| daemonsetAnnotations | object | {} |
|
| daemonsetLabels | object | {} |
|
| dashboard | object | {"annotations":{},"enabled":false,"label":"grafana_dashboard","namespace":"kube-system"} |
https://github.com/grafana/helm-charts/blob/main/charts/grafana/README.md |
| dashboard.label | string | "grafana_dashboard" |
label that grafana sidecar is configured to look for |
| dashboard.namespace | string | "kube-system" |
namespace where grafana sidecar is configured to look for dashboards. e.g. "monitoring" |
| fullnameOverride | string | "" |
|
| image.repository | string | "registry.k8s.io/dns/k8s-dns-node-cache" |
|
| image.tag | string | "" |
Overrides the image tag whose default is the chart appVersion. |
| imagePullSecrets | list | [] |
|
| initContainers | list | [] |
|
| lifecycle | object | {} |
Container lifecycle hooks for the node-cache pod. |
| nameOverride | string | "" |
|
| podAnnotations | object | {} |
|
| podLabels | object | {} |
|
| prometheusScraping.enabled | bool | true |
|
| resizePolicy | list | [] |
Resize policy for in-place pod vertical scaling. Container resize policies |
| resources.limits.memory | string | "128Mi" |
|
| resources.requests.cpu | string | "25m" |
|
| resources.requests.memory | string | "128Mi" |
|
| securityContext.capabilities.add[0] | string | "NET_ADMIN" |
|
| service.annotations | object | {} |
Annotations to add to the service. |
| serviceAccount.annotations | object | {} |
Annotations to add to the service account. |
| serviceAccount.create | bool | true |
Specifies whether a service account should be created. |
| serviceAccount.name | string | "" |
If not set and create is true, a name is generated using the fullname template. |
| serviceMonitor | object | {"enabled":false,"honorLabels":false,"labels":{},"metricRelabelings":[],"namePrefix":"","path":"/metrics","prometheusNamespace":"kube-system","relabelings":[]} |
https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/getting-started.md |
| serviceMonitor.enabled | bool | false |
Ensure that servicemonitor is created, this will disable prometheus annotations |
| serviceMonitor.metricRelabelings | list | [] |
Metric relabel configs to apply to samples before ingestion. Metric Relabeling |
| serviceMonitor.namePrefix | string | "" |
The service monitor name prefix which align with the prometheus operator name, eg.: kube-prometheus-stack |
| serviceMonitor.prometheusNamespace | string | "kube-system" |
The namespace of prometheus where the service monitor should be deployed |
| serviceMonitor.relabelings | list | [] |
Relabel configs to apply to samples before ingestion. Relabeling |
| tolerations[0].key | string | "CriticalAddonsOnly" |
|
| tolerations[0].operator | string | "Exists" |
|
| tolerations[1].effect | string | "NoExecute" |
|
| tolerations[1].operator | string | "Exists" |
|
| tolerations[2].effect | string | "NoSchedule" |
|
| tolerations[2].operator | string | "Exists" |
|
| updateStrategy | object | {"rollingUpdate":{"maxUnavailable":"10%"},"type":"RollingUpdate"} |
DaemonSet update strategy configuration |
| Name | Url | |
|---|---|---|
| gabrieladt | https://github.com/gabrieladt |
Chart source: github.com/deliveryhero/helm-charts/node-local-dns
Older chart versions: github.com/deliveryhero/helm-charts/pkgs/container/helm-charts/node-local-dns