kelseyhightower / kubernetes-the-hard-way

Bootstrap Kubernetes the hard way. No scripts.
Apache License 2.0
39.77k stars 13.65k forks source link

How DNS resolution happens? #777

Open SathishSQSH opened 2 months ago

SathishSQSH commented 2 months ago

Bootstrapped K8S cluster with the recent changes, and the pods running are unable to resolve DNS. I could see DNS nameserver 10.32.0.10. configured in kubelet.

Is there any config needed?like installing coredns or something? or How can i make pod to resolve DNS.

pfitzmsn commented 2 months ago

I just grabbed the latest helm from https://helm.sh/docs/intro/install/ and installed it on the jump server.

Verified helm was good to go on jump server. $helm version version.BuildInfo{Version:"v3.14.4", GitCommit:"81c902a123462fd4052bc5e9aa9c513c4c8fc142", GitTreeState:"clean", GoVersion:"go1.21.9"}

Then ran: $helm --namespace=kube-system install coredns coredns/coredns --set service.clusterIP="10.32.0.10"`

SathishSQSH commented 2 months ago

okay. I could see below config in kubelet config file. If we need coredns, we can simply run the coredns manifests. But how these are interconnected.

clusterDomain: "cluster.local" clusterDNS: