NodeLocal DNSCache
Description
NodeLocal DNSCache is a plug-in developed based on the community NodeLocal DNSCache. It functions as a daemon program that runs the DNS cache proxy on cluster nodes to improve cluster DNS performance.
After NodeLocal DNSCache is enabled, a DNS query goes through the path as shown below.

- 1. By default, the pods with DNSConfig injected use NodeLocal DNSCache to resolve requested domain names.
- 2. If NodeLocal DNSCache cannot resolve domain names, it will ask CoreDNS for resolution.
- 3. CoreDNS resolves domain names outside the cluster by using the DNS server in the VPC.
- 4. If a pod with DNSConfig injected cannot access NodeLocal DNSCache, CoreDNS will resolve the domain name.
- 5. By default, CoreDNS resolves domain names for the pods without DNSConfig injected.
Constraints
- NodeLocal DNSCache can be installed in ModelArts Standard dedicated resource pool.
- Supported CCE versions: v1.25 to v1.31
Installing a Plug-in
Install the specified plug-in in the resource pool.
- Log in to the ModelArts console. In the navigation pane on the left, choose Standard Cluster.
- Click the resource pool to access its details page.
- On the resource pool details page, click the Plug-ins tab.
- Locate the plug-in to be installed in the list and click Install.
Figure 2 Installing a plug-in
- In the displayed dialog box, configure the parameters.
Table 1 Parameters for configuring NodeLocal DNSCache Parameter
Sub-Parameter
Description
Specifications
Plug-in Version
Version of NodeLocal DNSCache to be deployed. Version 1.6.64 is supported.
Plug-in Specifications
Preset: Select HA or Standalone.
HA: Dual pods for the automatic DNSConfig injection controller, improving plug-in reliability
Standalone: Single pod for the automatic DNSConfig injection controller, consuming fewer resources
For details, see Configuration List.
Custom: Specify the configuration for deploying NodeLocal DNSCache, including the number of copies, CPU application quota/limitation, and memory application quota/limitation.
Configuration List
Specify the configuration parameters of the NodeLocal DNSCache plug-in.
When you select custom specifications, you can specify the number of copies, CPU application quota/limitation, and memory application quota/limitation.
Parameter Configuration
DNSConfig
If this function is enabled, the Admission Webhook intercepts pod creation requests from the target namespace and automatically injects a DNSConfig that uses the DNS cache.
DNSConfig will be enabled for all namespaces by default, including existing ones (except for the built-in ones) by automatically adding the node-local-dns-injection=enabled label to them. If the DNS configuration already exists in the pod, the pod's DNS configuration will be preferentially used.
If this function is disabled, DNSConfig will not be automatically injected when pods are created in all namespaces. The injected pod DNSConfig is not affected.
IP Address of DNS Server (Optional)
IP address list of the queried DNS server when the container resolves the domain name. You need to configure this parameter if DNSConfig is enabled. NodeLocal DNSCache and CoreDNS IP addresses are added by default. You can add an additional IP address. Repeated IP addresses will be deleted.
Search Domain (Optional)
Queried DNS search domain list of the host name in the pod. You need to configure this parameter if DNSConfig is enabled. This parameter is optional. When specified, the provided list will be merged into the base search domain names generated from the chosen DNS policy. Duplicate domain names are removed. Kubernetes allows for at most 3 search domains.
ndots (Optional)
You need to configure this parameter if DNSConfig is enabled.
If a domain name has fewer periods (.) than the specified value of this parameter, the domain name will be combined with the search domain list for DNS query. If it still cannot be resolved, the domain name will be used for DNS query. If the number of periods (.) in a domain name is greater than or equal to the value of ndots, the domain name will be tried first for DNS query. If the domain name cannot be resolved, DNS queries will be attempted by combining the domain name with each domain in the search list.
- Read "Usage Notes" and select I have read and understand the preceding information.
- Click OK.
Components
Component |
Description |
Resource Type |
---|---|---|
node-local-dns-admission-controller |
Automatic DNSConfig injecting |
Deployment |
node-local-dns-cache |
DNS cache proxy on nodes to improve the DNS performance of the cluster |
DaemonSet |
Related Operations
For details, see Viewing the Plug-ins of a Standard Resource Pool on the Resource Pool Details Page.
Change History
Plug-in Version |
New Feature |
---|---|
1.6.66 |
CCE 1.31 clusters are supported. The admission-controller logs have been updated to standard output logs, and node-local-dns supports custom health check ports. |
1.6.64 |
CCE 1.31 clusters are supported. The admission-controller logs have been updated to standard output logs. node-local-dns supports custom health check ports. |
1.6.63 |
CCE 1.31 clusters are supported. The admission-controller logs have been updated to standard output logs. node-local-dns supports custom health check ports. |
1.6.62 |
CCE 1.31 clusters are supported. The admission-controller logs have been updated to standard output logs, and node-local-dns supports custom health check ports. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot