Enable kernel-level DNS caching for ECI pods to reduce DNS latency—no dnsConfig changes required.
Prerequisites
Before you begin, make sure you have:
-
An ACK Serverless cluster is created.
-
The ACK virtual node add-on v2.10.0-rc.10 or later is installed. See Manage system components.
How BlazingDNS works
When a pod on an ECI sends a DNS query, BlazingDNS checks its kernel-level cache before forwarding to the upstream DNS server. Cached responses return immediately.
Because caching runs at the kernel level, no changes to dnsConfig or DNS server settings are required.
After installation, DNS requests from ECIs are cached automatically:
Limitations
BlazingDNS is available only in ACK Serverless clusters and accelerates DNS resolution only for ECI pods. Additional limitations:
-
Supports DNS queries for A, AAAA, and CNAME records only.
-
Supports UDP-based DNS queries only.
-
Supports DNS responses up to 256 bytes.
DNS cache acceleration applies only to pods created after BlazingDNS is installed. Existing pods are not affected.
Install BlazingDNS
-
Log on to the ACK console. In the left-side navigation pane, click Clusters.
-
On the Clusters page, click the cluster name. In the left-side navigation pane, choose Operations > Add-ons.
-
On the Add-ons page, click the Networking tab. Find the BlazingDNS card, then click Install and follow the on-screen instructions.
After installation:
-
A ConfigMap named
blazing-dnsis created in thekube-systemnamespace. Do not modify or delete this ConfigMap. -
DNS cache acceleration automatically applies to new pods on ECIs.
Verify that BlazingDNS is active
Check the k8s.aliyun.com/dns-cache-enable annotation on the pod. true confirms DNS cache acceleration is active.
Upgrade BlazingDNS
On the Add-ons page, click the Networking tab. Find the BlazingDNS card, then click Upgrade and follow the on-screen instructions.
Uninstall BlazingDNS
Before uninstalling BlazingDNS, disable it for all running pods.
Step 1: Identify pods with BlazingDNS enabled
List pods with BlazingDNS enabled:
kubectl get pod -o=jsonpath='{.items[?(@.metadata.annotations.k8s\.aliyun\.com/dns-cache-enable=="true")].metadata.name}' -A
If jq is installed, print the namespace for each pod:
kubectl get pod -o=jsonpath='{.items[?(@.metadata.annotations.k8s\.aliyun\.com/dns-cache-enable=="true")]}' | jq -rc ".metadata.namespace,.metadata.name"
Step 2: Disable BlazingDNS for affected pods
If the commands above return results, disable BlazingDNS before proceeding:
-
Log on to the ACK console. In the left-side navigation pane, click Clusters.
-
On the Clusters page, click the cluster name. In the left-side navigation pane, choose Configurations > ConfigMaps.
-
On the ConfigMap page, select the
kube-systemnamespace. In the Actions column of theblazing-dnsConfigMap, click Edit. Setconfigtoenabled: false. -
Delete and recreate the affected pods, then rerun the command from Step 1 until no pods are returned.
Step 3: Uninstall the add-on
On the Add-ons page, click the Networking tab. Find the BlazingDNS card, then click Uninstall and follow the on-screen instructions.