How Do I Configure the DNS Service on CCI?
If workloads require the internal domain name resolution provided by Kubernetes, the coredns add-on must be installed. In this case, dnsPolicy of pods must be set to ClusterFirst.
On the Add-on Marketplace page, click  on the card of the coredns add-on to install it under the specified namespace.
 on the card of the coredns add-on to install it under the specified namespace.
 
 If workloads do not require the internal domain name resolution provided by Kubernetes but require DNS, dnsPolicy of pods must be set to Default.
In addition, you can set dnsPolicy of pods to None to use the custom DNS service. The following is a YAML example:
apiVersion: v1
kind: Pod
metadata:
  namespace: default
  name: dns-example
spec:
  containers:
    - name: test
      image: nginx
  dnsPolicy: "None"
  dnsConfig:
    nameservers:
      - 1.2.3.4
    searches:
      - ns1.svc.cluster-domain.example
      - my.dns.search.suffix
    options:
      - name: ndots
        value: "2"
      - name: edns0
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 
    