Overview
Application Scenarios
DNS is a critical foundational service in Kubernetes. When DNS policies are misconfigured, especially in large-scale clusters, DNS resolution may time out or fail. In severe cases, a large number of services in the cluster may fail to be resolved. This section describes the best practices for optimizing CoreDNS in Kubernetes clusters to help prevent these issues.
Solution
CoreDNS optimization covers both client-side and server-side improvements.
On the client side, you can optimize domain name resolution requests to reduce latency, use appropriate container images, and use NodeLocal DNSCache to reduce resolution failures.
- Optimizing Domain Name Resolution Requests
- Selecting a Proper Image
- Avoiding Occasional DNS Resolution Timeout Caused by IPVS Defects
- Using NodeLocal DNSCache
- Keeping CoreDNS Up to Date
- Adjusting the DNS Settings of the VPC and VM
On the server side, you can adjust the CoreDNS deployment or fine-tune its settings to improve availability and throughput.
For details about CoreDNS settings, see https://coredns.io/.
CoreDNS open-source community: https://github.com/coredns/coredns
Prerequisites
- A CCE cluster is available. For details about how to create a cluster, see Buying a CCE Standard/Turbo Cluster.
- You can access the cluster using kubectl. For details, see Accessing a Cluster Using kubectl.
- The CoreDNS add-on is installed in the cluster. The latest version of CoreDNS is recommended. For details, see CoreDNS.
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
