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

skydns not working on local ubuntu setup #19076

Closed
jmartin127 opened this issue Dec 23, 2015 · 3 comments
Closed

skydns not working on local ubuntu setup #19076

jmartin127 opened this issue Dec 23, 2015 · 3 comments

Comments

@jmartin127
Copy link

I have kubernetes running locally using hack/local-up-cluster.sh. I then installed the add-ons using: cluster/ubuntu/deployAddons.sh. However, DNS is not working properly as seen by:

Running nslookup within a simple buxybox pod:

$ kubectl exec busybox -- nslookup kubernetes.default
Server:    127.0.1.1
Address 1: 127.0.1.1

nslookup: can't resolve 'kubernetes.default'
error: Error executing remote command: Error executing command in container: Error executing in Docker Container: 1

Here are the skydns logs:

$ kubectl --namespace=kube-system logs kube-dns-v9-k9awk -c skydns
2015/12/23 23:35:18 skydns: failure to forward request "read udp 127.0.1.1:53: i/o timeout"
2015/12/23 23:35:20 skydns: failure to forward request "read udp 127.0.1.1:53: i/o timeout"
2015/12/23 23:35:21 skydns: failure to forward request "read udp 127.0.1.1:53: i/o timeout"

resolv.conf on the skydns pod

$ kubectl --namespace=kube-system exec kube-dns-v9-k9awk -c skydns -- cat /etc/resolv.conf
search localdomain
nameserver 127.0.1.1
options ndots:5

resolv.conf on the host

$ cat /etc/resolv.conf 
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
search localdomain

The skydns pod is not running with net=host

The command line args for theskydns process.

# command = "/skydns"
    - -machines=http://127.0.0.1:4001
    - -addr=0.0.0.0:53
    - -ns-rotate=false
    - -domain=cluster.local.

Endpoints

$  kubectl get ep --all-namespaces
NAMESPACE     NAME         ENDPOINTS
default       kubernetes   192.168.245.149:6443
kube-system   kube-dns     172.17.0.2:53,172.17.0.2:53
kube-system   kube-ui      172.17.0.3:8080

Note: the only change I made to the default configuration was in cluster/ubuntu/config-default.sh. I changed the following lines to make the service ip range compatible with the range listed in local-up-cluster.sh:

...
export SERVICE_CLUSTER_IP_RANGE=${SERVICE_CLUSTER_IP_RANGE:-10.0.0.0/24} 
...
DNS_SERVER_IP=${DNS_SERVER_IP:-"10.0.0.10"}

Any help you can provide would be greatly appreciated.

@jmartin127
Copy link
Author

I was able to get this working by adding the following to the kubelet startup command within hack/local-up-cluster.sh:
--cluster-dns=10.0.0.10 --cluster-domain=cluster.local

@guowenbo045889
Copy link

holsy shit i gotta the same problem

@tobegit3hub
Copy link

@jmartin127 @guowenbo045889 You need to run deployAddons.sh if you want to create namespace and dns addon.

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