因为需要调查GPU在k8s上的使用,所以研究下k8s 1.6版本的安装。


kubeadm init执行出现bug:


[apiclient] Temporarily unable to list nodes (will retry)
[apiclient] Temporarily unable to list nodes (will retry)
[apiclient] Temporarily unable to list nodes (will retry)


搜了半天才找到原因:(要是当时直接看api server的log也能发现)

(原文地址:https://github.com/kubernetes/kubeadm/issues/226)

简单的说就是dns server把localhost解析到其他地址去了。可以通过nslookup 命令验证:

[root@master ~]# nslookup localhost
Server: 218.2.135.1
Address: 218.2.135.1#53


Non-authoritative answer:
Name: localhost
Address: 202.102.110.203


如上所示:  该dns server吧localhost解析到了一台202开头的机器上了。而我们需要的是127.0.0.1


所以重新配置了一个dns server:

[root@master ~]# nslookup localhost
Server: 192.168.10.61
Address: 192.168.10.61#53


Name: localhost
Address: 127.0.0.1


重新kubeadm init 成功。(记得先要执行kubeadm reset)


Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐