vSphere Container Storage Plug-in requires DNS forwarding configuration in CoreDNS ConfigMap to help resolve vSAN file share hostname.

Procedure

  1. Modify the CoreDNS ConfigMap and add the conditional forwarder configuration
    kubectl -n kube-system edit configmap coredns
  2. The output of step 1 is shown below
     .:53 {
        errors
        health {
           lameduck 5s
        }
        ready
        kubernetes cluster.local in-addr.arpa ip6.arpa {
           pods insecure
           fallthrough in-addr.arpa ip6.arpa
           ttl 30
        }
        prometheus :9153
        forward . /etc/resolv.conf {
           max_concurrent 1000
        }
        cache 30
        loop
        reload
        loadbalance
       }
       vsanfs-sh.prv:53 {
       errors
       cache 30
       forward . 10.161.191.241
       }

    In the above configuration, vsanfs-sh.prv is the DNS suffix for vSAN file service and 10.161.191.241 is the DNS server that resolves file share hostname. You can obtian DNS suffix and DNS IP address from vCenter (vSphere Cluster > Configure > vSAN > Services > File Service)