2

The /etc/resolv.conf in my containers show "default.svc.cluster.local", if I do an nslookup on one of my services, it shows {servicename}.default.svc.cluster.local. I was wondering what the 'svc' in the search path was referring to as I am doing an nslookup on the servicename already. I.e. is it not duplicated?

For the "cluster.local" part, how do you find the name of your cluster? I would like to know so that I can define it in my Helm template.

xbfh0516
  • 129
  • 1
  • 2
  • 5

1 Answers1

2

cluster.local is defined in a configMap coredns in kube-system namespace.

kubectl get cm coredns -n kube-system -o yaml
apiVersion: v1
data:
  Corefile: |
    .: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
        cache 30
        loop
        reload
        loadbalance
    }

Check the docs if you want to customize it.

Arghya Sadhu
  • 41,002
  • 9
  • 78
  • 107
  • Ah, great thanks! Do you know what the "svc" in "{servicename}.default.svc.cluster.local" means if {servicename} is at the start? – xbfh0516 Jun 19 '20 at 01:33