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

Kubernetes.addons.dns: Intermittent name resolution with Alpine #61023

Open
azazel75 opened this issue May 6, 2019 · 1 comment
Open

Kubernetes.addons.dns: Intermittent name resolution with Alpine #61023

azazel75 opened this issue May 6, 2019 · 1 comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md

Comments

@azazel75
Copy link
Contributor

azazel75 commented May 6, 2019

Issue description

Hello,
I've had some issues with an alpine:3.9 based container. After extensive digging ( see fluxcd/flux#1980 ) I think this is due to alpine's issues with name resolution ( a quick look into the issues of the docker-alpine project shows that I'm not alone in that). At this point it's unclear what's happening, I've tried to upgrade CoreDNS to 1.5.0 but the issue it's still there.

It has something to do with the searches into the declared domain (this is the file /etc/resolv.conf):

# cat /etc/resolv.conf 
nameserver 10.0.0.254
search default.svc.cluster.local svc.cluster.local cluster.local foo.it
options ndots:5

Other base images like Busybox or Debian seems not to be affected by this

Steps to reproduce

in my case:

$ kubectl run -i --tty --image-pull-policy=Always --image alpine:3.9 dns-tests --restart=Never --rm /bin/sh
If you don't see a command prompt, try pressing enter.
/ # ping -c 1 gitlab.com
ping: bad address 'gitlab.com'
/ # ping -c 1 pippo.it
ping: bad address 'pippo.it'
# nslookup gitlab.com
nslookup: can't resolve '(null)': Name does not resolve

nslookup: can't resolve 'gitlab.com': Name does not resolve

but explictly making the resolution absolute does the trick:

/ # nslookup gitlab.com.
nslookup: can't resolve '(null)': Name does not resolve

Name:      gitlab.com.
Address 1: 35.231.145.151 151.145.231.35.bc.googleusercontent.com
/ # ping -c 1  gitlab.com.
PING gitlab.com. (35.231.145.151): 56 data bytes
64 bytes from 35.231.145.151: seq=0 ttl=42 time=103.690 ms

--- gitlab.com. ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 103.690/103.690/103.690 ms

Technical details

  • system: "x86_64-linux"
  • host os: Linux 5.0.10, NixOS, 19.03pre-git (Koi)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.2.2
  • channels(root): "nixos-19.03.172477.8838032e905"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

K8s is installed from unstable:

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.0", GitCommit:"641856db18352033a0d96dbc99153fa3b27298e5", GitTreeState:"archive", BuildDate:"1970-01-01T00:00:01Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.0", GitCommit:"641856db18352033a0d96dbc99153fa3b27298e5", GitTreeState:"archive", BuildDate:"1970-01-01T00:00:01Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
@stale
Copy link

stale bot commented Jun 2, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Projects
None yet
Development

No branches or pull requests

1 participant