Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How DNS resolution happens? #777

Open
SathishSQSH opened this issue Apr 16, 2024 · 3 comments
Open

How DNS resolution happens? #777

SathishSQSH opened this issue Apr 16, 2024 · 3 comments

Comments

@SathishSQSH
Copy link

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
Copy link

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
Copy link
Author

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:

  • "10.32.0.10"

@YievCkim
Copy link

YievCkim commented Aug 17, 2024

Hey there !

I had this problem too, and I don't want to use Helm right now.

I have installed coredns following instruction here and adapting DNS clusterIP

seems to work:

root@jumpbox:~# kubectl exec -ti -n default busybox -- nslookup kubernetes
Server:    10.32.0.10
Address 1: 10.32.0.10 kube-dns.kube-system.svc.cluster.local

Name:      kubernetes
Address 1: 10.32.0.1 kubernetes.default.svc.cluster.local

Hope it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants