-
Notifications
You must be signed in to change notification settings - Fork 531
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
Not resolving using search domain #8
Comments
Looks like musl doesn't support |
@andyshinn the musl behavior of querying all nameservers in |
Yep, agree it should be noted somewhere. I'll add some more information to the docs about the caveats soon. |
@andyshinn The docs are a good start, but they raise further questions. It would be great if the section on dnsmasq (http://gliderlabs.viewdocs.io/docker-alpine/caveats) could be fleshed out to provide a full solution. |
I tried to provide a general example of the use case where you want to send internal requests to a Consul server and the rest out to upstream name servers. What specifically do you think the example is missing? |
A brief description of dnsmasq and how to use it - on the host, as an additional container, etc. In other words, specific instructions on use, rather than "maybe try this workaround". |
I think it could use a full dnsmasq config for the custom+upstream DNS On Tue, Mar 24, 2015 at 3:36 PM, Aris Pikeas [email protected]
Jeff Lindsay |
I was so hopeful for docker-alpine - I need a mini package for DNS utils. Alas, DNS in alpine seems to be totally busted. A shame. |
I set up a dnsmasq container. In
In alpine container I set the dns pointing to that dnsmasq container. The problem is when I do |
The 3 dnsmasq options that might append a domain to unqualified names is |
This cannot be solved using dnsmasq, dnsmasq assumes glibc has expanded the hostname from the search entry in /etc/resolv.conf. If you are in an environment (like Tutum) where links don't work because of this: https://gist.github.com/neilellis/8983d6977f45f126df28 Is my workaround in conjunction with running dnsmasq: dnsmasq --resolv-file=/etc/dnsmasq-resolv.conf --addn-hosts=/etc/hosts.links --no-daemon The full image is at https://github.com/vizzbuzz/base-alpine |
Alternatively we have a container called Resolvable that helps: |
Just because no one has mentioned it yet.. DNS search/domain resolution is really important in a kubernetes cluster. Kubernetes services are used for just about every integration point and they all resolve through DNS. Kubernetes injects the right information into /etc/resolv.conf to do this. The fact that I can't connect to myservice.mynamespace from within an alpine container prevents me from doing anything useful. For example, I have a service called etcd.system that resolves to etcd host for http puts and gets. A very common thing is to write to etcd via curl for application configuration, etc. Alpine is the smallest base image that easily lets you download and use curl, but because my kubernetes service, etcd.system, isn't resolvable I am dead in the water. I now have to use a 100 meg image to curl, when the 6 meg one would have done fine. Just food for thought. |
Totally agree. Hopefully this puts pressure on musl developers to address this problem. If anybody knows the best way to do this, please share. In the meantime, we're probably adding search domain support to Resolvable. |
I guess this is still dead in the water. Ran into the exact same use-case as @hypergig, using Kubernetes, hitting DNS problems, finding out Alpine doesn't support DNS The people at Kubernetes (specifically @thockin) seem to be aware of it at kubernetes/kubernetes#10163, but no dice so far. |
I'd like to see this resolved too. We're using skydns for service discovery. Has anyone raised this upstream with the musl devs? |
I seem to recall not finding a way to file a bug with them.
|
I've not found a way yet but if anybody finds a way or files an issue be sure to share the link. |
I've sent an email to the musl mailing list. It can be viewed at http://www.openwall.com/lists/musl/2015/09/04/3. I'm still gathering some information to answer all of Rich's questions (based on DNS use cases in Consul, Kubernetes and SkyDNS). If you have any specific use cases, please let me know or weigh in directly on the mailing list thread. |
Awesome. Let me know if there is anything I can do to help. On Fri, Sep 4, 2015 at 12:22 PM, Andy Shinn [email protected]
|
Any update on this? Just ran into it this morning. |
Sure, there is |
It looks like Rich's questions here are still unanswered: http://www.openwall.com/lists/musl/2015/09/04/5 Can anyone familiar with what Kubernetes et al need in this regard respond there? Or should we get Rich involved here? (I can't find him on GitHub though, so that might be out of the question) |
I think @thockin just re-ignited the conversation. Sorry I've been so lax on the subject. I want to be respectful of everyone's goals and didn't really know how to reasonably answer the questions yet based on the communities goals. |
I'm also facing this issue on rancher, specifically connecting to mongodb databases. My image is unable to resolve the name of a link coming from another stack. However, if the links are within the same stack it works just fine. I don't understand why exactly. I am now using a 300mb image when my average image size with alpine was 90mb. I would love to come back to alpine when this gets fixed. |
@danielo515 / @tuannvm: this is fixed from an Alpine perspective, but it's not as tolerant of non-conforming DNS servers, as was the case with Rancher's DNS until they recently fixed it for example. |
@dchambers do you know the minimum rancher version that works? I want to check mine. In wich Alpine version is this considered fixed ? |
I'm not 100% sure because I didn't perform the Rancher upgrade myself, but I know our cluster is definitely now working. More information in this issue. |
@danielo515, just saw the other part of your question and the answer is Alpine 3.4. |
Still have an issue with alpine 3.4 / kube-dns:1.9 |
Mostly to avoid [this](gliderlabs/docker-alpine#8) issue.
alpine does not support multiple nameservers as well. Only one |
Any updates on this? Using Jenkins based alpine images with dynamic slaves through kubernetes 1.8.3. Some alpine images can resolve external addresses and others can't. Both have the same |
I've stumbled onto this same issue, and I've solved it removing the a I've found out about the solution with this blog post: https://blog.maio.me/alpine-kubernetes-dns/ |
Cloudflare has EWONTFIX'd this issue according to: |
Exactly, that's why the only solution was removing the triggering domain from the |
Motivation - current version doesn't use /etc/resolv.conf which prevents kubernetes usage with the current image. See gliderlabs/docker-alpine#8
This is closed, but I'm still having problems in the latest release running on kubernetes (kops on AWS):
in busybox nslookup works fine:
|
This was eventually blamed on the alpine DNS resolver in musl, where it
died a slow, forgotten death.
…On Tue, May 22, 2018 at 2:16 PM, Ino de Bruijn ***@***.***> wrote:
This is closed, but I'm still having problems in the latest release
running on kubernetes (kops on AWS):
kubectl run -i --tty alpine --image=alpine --restart=Never -- nslookup kubernetes.default
nslookup: can't resolve '(null)': Name does not resolve
Name: kubernetes.default
Address 1: 100.64.0.1 kubernetes.default.svc.cluster.local
in busybox nslookup works fine:
kubectl run -i --tty busybox --image=busybox --restart=Never -- nslookup kubernetes.default
Server: 100.64.0.10
Address 1: 100.64.0.10 kube-dns.kube-system.svc.cluster.local
Name: kubernetes.default
Address 1: 100.64.0.1 kubernetes.default.svc.cluster.local
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAeOr3Q361ZnVQuDlqCOpyUmxy75CchCks5t1IAegaJpZM4DjZo8>
.
|
@Cloven nice, thanks for clarifying! Seems like it could be nice to have a p big warning sign for using alpine images on k8s somewhere |
I was experiencing a similar issue, and it was caused by a subtle configuration difference between alpine and glibc based linuxes. |
Hostname is not properly resolving within the container when setting --dns-search on Docker.
Docker settings:
gliderlabs/alpine
progrium/busybox
gliderlabs/registrator#111
The text was updated successfully, but these errors were encountered: