BlazingDNS provides DNS cache acceleration based on kernel programming technologies to greatly improve the stability and performance of DNS service discovery. This topic describes how to manage BlazingDNS.
Prerequisites
A Container Service for Kubernetes (ACK) Serverless cluster is created.
The ACK virtual node component is installed in the ACK Serverless cluster and the component is updated to 2.10.0-rc.10 or later. For more information, see Manage system components.
Usage notes
You cannot enable DNS cache acceleration for existing pods in ACK clusters.
Limits
You can install BlazingDNS only in ACK Serverless clusters to accelerate DNS resolution for applications deployed on elastic container instances.
BlazingDNS has the following limits:
BlazingDNS supports DNS queries against A, AAAA, and CNAME records.
BlazingDNS supports only UDP-based DNS queries.
BlazingDNS supports only DNS queries for which the responses are no larger than 256 bytes.
Introduction to BlazingDNS
BlazingDNS is a DNS caching program developed based on kernel programming technologies. It is intrusion-free, high-performance, and low-overheads. You can accelerate DNS resolution for application pods without the need to modify the DNS servers in the DNSConfig.
In the following figure, after BlazingDNS is enabled, DNS requests sent by elastic container instances are cached to accelerate DNS resolution. No additional configuration is needed.
Enable BlazingDNS
Log on to the ACK console. In the left-side navigation pane, click Clusters.
On the Clusters page, find the cluster that you want to manage and click its name. In the left-side pane, choose .
On the Add-ons page, click the Networking tab, find BlazingDNS, and then click Install in the BlazingDNS card. Follow the instructions to install BlazingDNS.
After BlazingDNS is installed, a configuration file named
blazing-dnsis created in thekube-systemnamespace. Do not modify or delete the configuration file.After you install BlazingDNS, DNS cache acceleration is enabled for new pods created on elastic container instances. You can check the Boolean value of
k8s.aliyun.com/dns-cache-enablein the Annotations section of a pod to determine whether DNS cache acceleration is enabled for the pod.
What to do next
Update BlazingDNS
On the Add-ons page, click the Networking tab, find BlazingDNS, and then click Upgrade in the BlazingDNS card. Follow the instructions to update the component. We recommend that you update BlazingDNS to experience the optimal DNS cache acceleration service.
Uninstall BlazingDNS
Before you uninstall BlazingDNS, make sure that BlazingDNS is disabled for all pods that are running in the cluster.
Run the following commands to check whether BlazingDNS is disabled for all running pods.
Query the names of the pods that have BlazingDNS enabled in the cluster.
kubectl get pod -o=jsonpath='{.items[?(@.metadata.annotations.k8s\.aliyun\.com/dns-cache-enable=="true")].metadata.name}' -AIf the current node has jq installed, run the following command to print the namespaces and names of the pods:
kubectl get pod -o=jsonpath='{.items[?(@.metadata.annotations.k8s\.aliyun\.com/dns-cache-enable=="true")]}' | jq -rc ".metadata.namespace,.metadata.name"
Check whether no pod is returned.
If pods are returned, perform the following steps to handle the pods that have BlazingDNS enabled before you delete BlazingDNS.
Log on to the ACK console. In the left-side navigation pane, click Clusters.
On the Clusters page, click the name of the one you want to change. In the left-side navigation pane, choose .
On the ConfigMap page, select the
kube-systemnamespace and click Edit in the Actions column ofblazing-dns. In the panel that appears, setconfigtoenabled: false.Delete and recreate the preceding pods, and then rerun the command until no pod is returned.
On the Add-ons page, click the Networking tab, find BlazingDNS, and then click Uninstall in the BlazingDNS card. Follow the instructions to uninstall BlazingDNS.
If no pod is returned, go to the Add-ons page, click the Networking tab, find BlazingDNS, and then click Uninstall in the BlazingDNS card. Follow the instructions to uninstall BlazingDNS.