-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Latest Build - DNS Does not Resolve #356
Comments
I've got the same issue. |
I'm having a similar problem, at least it's also in the kube-dns steps. "kubectl create -f https://storage.googleapis.com/kubernetes-the-hard-way/kube-dns.yaml" appears to succeed, the shell output matches yours and all four objects seem to have been created properly. The subsequent "kubectl get pods -l k8s-app=kube-dns -n kube-system" command returns "No resources found." "kubectl get pods" and "kubectl get deployments" also return "No resources found." "kubectl delete -f https://storage.googleapis.com/kubernetes-the-hard-way/kube-dns.yaml" successfully deletes the service, serviceaccount, anc configmap, but then after a wait, I get "error when stopping "kube-dns.yaml": timed out waiting for the condition" If I then try to recreate the DNS add-on, the first three appear to succeed and then I get an error "Error from server (AlreadyExists): error when creating "https://storage.googleapis.com/kubernetes-the-hard-way/kube-dns.yaml": deployments.extensions "kube-dns" already exists" My kubectl is version 1.10.4, cluster version 1.10.2. Any guidance would be appreciated. - randy |
Since posting the above I've reviewed the first 11 sections and confirmed that every "verify" step returns the indicated output: I don't believe I've missed anything in the steps leading up to the kube-dns section. Hope to hear from you. |
Can you get to the Node OS? If so, I installed dnsmasq:
|
I can ssh to each node. Installed dnsmasq, then installed weave as shown at https://www.weave.works/blog/weave-net-kubernetes-integration/ I appear to have some other problem that's keeping me from running anything including kube-dns, weave, etc. No matter what I create, run, apply, deploy, the setup reports success and then get pods or get deployment always shows "No resources found." Again, I've reviewed the steps pretty carefully, confirmed that I can "verify" everywhere the steps include that option, have also reviewed my bash history. If I don't hear otherwise soon, at some point I'll likely rip it all out and start again. |
I tested using debian stretch, and while it wasn't working at first (same issue with any service IP, 10.32.0.10, 10.32.0.1, etc...), I only needed to change kube-proxy's mode to userspace instead of iptables. Not really sure what the issue is though. Regards |
Also having problems with the DNS verification step, after following all the prerequisite steps and validations successfully.
The kube-dns pod logs do not show errors initially. But after a couple of minutes, the sidecar container has errors, not sure if this is relevant:
Am I missing something? Please advise. |
Same issue as Maarthen. |
Same issue here! But it seems the DNS addon part is not a prerequisite for the step 13) smoke test :-\ |
Using a FQDN in request is possible to get the right result and validate if DNS query is working, I found a similar situation about kube-dns: kubernetes/dns#169 but i did not went deep enough to understand if it is really related... |
Same issue with the time out here also:
I tried both weave and starting from scratch in another region, no luck. |
I tried to replace [1] https://github.com/coredns/deployment/tree/master/kubernetes |
Same issue for me.
|
I had the same problem
Problem solution
result:
perform in pod
Success! |
Wow! Just faced this problem a few minutes ago. Will try the solution shared by @apantin above |
Yay!!! @apantin solution above worked like a charm. The ONLY additional step I had to do was the following: After restarting the Kubelet daemon on all the Nodes, I had to delete the kube-dns installation that I already had and reinstall it. Steps listed below:
FWIW, I had deleted all busybox and nginx resources that I had running and re-installed them after the new kube-dns install. Anyways, as I said, the smoke tests mentioned by @apantin worked exactly as described. Meaning, nslookup on busybox still failed, but nslookup command worked on nginx after installing dnsutils. Thanks! |
Pinning the busybox image to |
@apantin THANK YOU! I struggled for like 8-9 hours on Friday/Saturday to figure out why nslookup was failing on busybox...and the problem was with busybox itself. Again, many thanks for sharing your experiences on this issue--much, much appreciated. |
Hi all, I've literally been dealing with this for days. Maybe a week. I've been trying to prove I could stand up K8s on CentOS on vSphere with a custom VMX datasource for cloud-init and some turn up code I've written. I just thought I was doing something wrong. Turns out all along I wasn't failing busybox, busybox was failing me. |
@akutz Yup, I wasted the better part of entire workday on this. Argh. |
Hi @hokiegeek2, Yep. I was trying to teach myself the basics of K8s. I learn by doing. So to heck with opinionated Linux distros like Container Linux and Photon. At least for the purpose of learning how the pieces of K8s fit together. I needed to do it from scratch. Hell, I got to this part using Container Linux, and it just dawned on me it was probably working too! I was using Busy Box, and of course it was failing. I just loathed CL because it comes with etcd, ContainerD, etc., and to try and use your own versions of those requires a lot of hackery on your part. I figured it was something conflicting with the stock versions of the same components I was laying down for this guide. Nope. Just Busy Box. Does anyone even know why this happens? |
Hi @pdecat, I can confirm it works with $ kubectl run bb3 --image=busybox:1.28 --command -- sleep 3600
deployment.apps/bb3 created $ POD_NAME=$(kubectl get pods -l run=bb3 -o jsonpath="{.items[0].metadata.name}") $ kubectl exec -ti $POD_NAME -- 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 |
Version `1.28.4` of busybox does the `nslookup` correctly as described in the tutorial, the `latest` does not. So it needs to be set explicitely. Fixes kelseyhightower#356. Also see docker-library/busybox#48.
Question for @apantin -- How did you know to use the |
I've updated the kubelet in the latest guide to use the --resolve-conf flag to ensure DNS works with the system DNS resolver. I've also replaced KubeDNS with CoreDNS. |
I followed @apantin but then after i deleted coredns artifacts i cannot reinstall it anymore. After i create using the yaml file for coredns, no pods get spun and it hangs at deployment level. It also says "kube-dns" is invalid: spec.clusterIP: Invalid value: "10.32.0.10": provided IP is not in the valid range. The range of valid IPs is 10.100.0.0/16. So i changed the cluster IP address. What did I do wrong? |
Ok, I've run through this on GCP several times, and it fails in the same place each time. IOW, a step-by-step iteration on GCP current does not work, IMO.
The issue is within the kube-dns step (12).
The contents of the worker's resolve.conf:
The default kube-dns yaml from https://storage.googleapis.com/kubernetes-the-hard-way/kube-dns.yaml shows version 1.14.7 and I've also tried 1.14.10 but same result...
logs from kube-dns:
Please let me know what other info I can provide. Thanks!
The text was updated successfully, but these errors were encountered: