2016-04-23 57 views
1

我正在爲此kDB模板設置skydns http://kubernetes.io/docs/getting-started-guides/docker-multinode/skydns.yaml.in。但它不能解決DNS。在查找解決方案後,還在kube2sky參數中添加了-kube_master_url,但仍然是同樣的問題。這裏是skydns日誌:skydns無法解析kubernetes集羣中的dns

2016/04/23 02:49:26 skydns: falling back to default configuration, could not read from etcd: 501: All the given peers are not reachable (failed to propose on members [http://127.0.0.1:4001] twice [last error: Get http://127.0.0.1:4001/v2/keys/skydns/config?quorum=false&recursive=false&sorted=false: dial tcp 127.0.0.1:4001: connection refused]) [0] 
2016/04/23 02:49:26 skydns: ready for queries on cluster.local. for tcp://0.0.0.0:53 [rcache 0] 
2016/04/23 02:49:26 skydns: ready for queries on cluster.local. for udp://0.0.0.0:53 [rcache 0] 
2016/04/23 02:49:33 skydns: error from backend: 501: All the given peers are not reachable (failed to propose on members [http://127.0.0.1:4001] twice [last error: Get http://127.0.0.1:4001/v2/keys/skydns/local/cluster/svc/default/kubernetes?quorum=false&recursive=true&sorted=false: dial tcp 127.0.0.1:4001: connection refused]) [0] 

任何指針? Kube2sky日誌:

I0423 02:49:39.286489  1 kube2sky.go:436] Etcd server found: http://127.0.0.1:4001 
I0423 02:49:40.295909  1 kube2sky.go:503] Using http://172.17.0.1:8080 for kubernetes master 
I0423 02:49:40.296183  1 kube2sky.go:504] Using kubernetes API v1 
+0

該問題似乎與TLS證書有關。在kube2sky日誌中獲得這個:'x509:由未知權威簽名的證書。在重試之前睡1秒 – devd

回答

1

我有一些iptables規則設置哪些是阻擋docker0界面,kub​​ernetes服務,包括skydns正在運行的連接。沖洗它的規則後,它的工作。因此,看起來第一個問題是我的本地設置而不是skydns。

然而問題安裝本地搬運工註冊表後,又出現了,我得到這個錯誤:

I0427 20:30:45.183419 1 kube2sky.go:627] Ignoring error while waiting for service default/kubernetes: Get https://10.0.0.1:443/api/v1/namespaces/default/services/kubernetes: x509: certificate signed by unknown authority. Sleeping 1s before retrying. 

作爲一種變通方法我刪除了使用kubectl delete secrets/default-token-q4siz然後重新skydns祕密,它開始再次合作。