Specifying Default DNS Servers
If you want to use CCI pods to handle extra workloads, you need to specify DNS servers. The CCE Cloud Bursting Engine for CCI add-on allows you to specify DNS servers, so you do not need to configure the dnsConfig field for each pod, reducing network O&M costs.
- Log in to the CCE console.
- Click the name of the target CCE cluster to go to the cluster Overview page.
- In the navigation pane, choose Add-ons.
- Select the CCE Cloud Bursting Engine for CCI add-on and click Edit.
- Click Edit YAML.
- Log in to a CCE cluster node and edit the YAML file of the add-on.
kubectl edit deploy bursting-cceaddon-virtual-kubelet-virtual-kubelet -n kube-system
- Add --cluster-dns=x.x.x.x to the startup parameters and replace x.x.x.x with the DNS server address.
- Save the modification and wait for the bursting-virtual-kubelet workload to restart.
- Verify the DNS server address. Run the exec command to access a container running in CCI and check whether the IP address following nameserver in the first line is the address configured for cluster-dns in the /etc/resolv.conf file.
Table 1 Constraints in different scenarios Scenario
Constraints
There are workloads scheduled to CCI before the DNS server address is specified.
- The DNS server address is only available for new workloads that are scheduled to CCI.
- To make the DNS server address available for the workloads that are scheduled to CCI before the modification, you need to rebuild these workloads.
There is a limit for cluster-dns.
- You can specify a maximum of three DNS servers in dnsConfig.
- Ensure that the sum of the nameserver value in cluster-dns and the nameservers value in spec.dnsConfig does not exceed 3.
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