Updated on 2025-08-12 GMT+08:00

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.

  1. Log in to the CCE console.
  2. Click the name of the target CCE cluster to go to the cluster Overview page.
  3. In the navigation pane, choose Add-ons.
  4. Select the CCE Cloud Bursting Engine for CCI add-on and click Edit.
  5. Click Edit YAML.
  6. 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

  1. Add --cluster-dns=x.x.x.x to the startup parameters and replace x.x.x.x with the DNS server address.
  2. Save the modification and wait for the bursting-virtual-kubelet workload to restart.

  3. 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.