-
Notifications
You must be signed in to change notification settings - Fork 2.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
CRITICAL: Use Debian as a base container instead of Alpine since Alpine causes DNS issues. #1161
Comments
Here's an article that outlines the issue with Alpine: Here's an open issue with regards to running Alpine on Kubernetes clusters: Another open issue with Alpine + Go + DNS dropping: An open issue with Rancher: Another open issue on the Alpine repo, which even involved editing an AWS ECS AMI: There's 6 more projects I found that has the exact same issue, but I'm not going to post any more haha. |
Actually, it was an issue on my host, but regardless, Alpine will not take in multiple DNS servers and will not fall-back to another "search" in /etc/resolv.conf I ended up removing "net" from my host /etc/resolv.conf and it fixed the issue. But regardless, I think we should still switch to Debian 😄 |
Can't reproduce your issue.
The only thing that doesn't work for me is resolving hosts in the LAN (*.fritz.box) but that seems to be a config issue with coredns rather than with alpine. |
Just FYI: cert-manager won't use Alpine's (musl) DNS resolver, it's fully statically compiled and uses Go's built-in resolver. So |
I'm going to close this as it doesn't seem to be an issue, given we don't use alpine's own DNS resolution. If I'm wrong, or there's some other issue with the way we handle networking then please feel free to re-open 😄 |
#1161 (comment) |
So here's the issue...
In some clusters, DNS will not resolve correctly due to Alpine not handling DNS resolution correctly. Alpine is used as a base image for cert-manager.
This is a critical problem as I'm unable to get this to work within my large Kubernetes cluster with Let's Encrypt.
There is a HUGE chain of issues that describe's what's happening. Essentially, Alpine does not resolve the DNS queries correctly and either returns incorrect queries, or (depending if the provider uses Cloudflare), returns them incorrectly.
I'm unfamiliar with Bazel, but it'd be good to change it from Alpine to Debian here: https://github.com/jetstack/cert-manager/blob/5b8fd9415e324a989e63915f050b2484fb5839ba/WORKSPACE#L72
How to replicate the bug and what happens:
Deploy cert-manager:
Now try to do an nslookup within the cert-manager container:
This returns an INCORRECT dns entry. The reasoning behind this can be found in multiple issues: kubernetes/kubernetes#30215 gliderlabs/docker-alpine#8 https://github.com/JiscRDSS/rdss-arkivum-nextcloud/pull/24 kubernetes/dns#119
Larger projects have also switched over to using Debian instead of Alpine due to an incredible amount of DNS issues: apache/openwhisk#4052
This is due to Alpine not resolving the
/etc/resolv.conf
file correctly:After removing "net" (provided by Kubernetes) from /etc/resolv.conf, DNS now resolves correctly:
I highly suggest changing the base image from Alpine (the current one) to Debian in order to resolve these DNS issues as at the moment, cert-manager is incompatible with Let's Encrypt due to DNS issues not being able to resolve correctly with the current Alpine image.
I'd honestly open a PR, but it looks like the Alpine image is being built somewhere else and is pushed to
gcr.io
.Ping @munnerz @kragniz
The text was updated successfully, but these errors were encountered: