How Do I Configure a DNS Policy for a Container?

CCE uses dnsPolicy to identify different DNS policies for each pod. The value of dnsPolicy can be either of the following:

If the type of dnsPolicy is not specified, ClusterFirst is used by default.

If a workload does not need to use CoreDNS in the cluster, you can use kubectl or call the APIs to set the dnsPolicy to Default.