我对丢失DNS有什么了解。我跟着在这里列出的说明: https://github.com/kubernetes/kubernetes/tree/v1.2.0-alpha.5/cluster/addons/dnskubernetes.default未通过DNS解析
当我的测试荚似乎工作的DNS吊舱的节点上运行,但是当我的测试吊舱,没有它不与DNS荚节点上运行。这使我相信某些东西没有正确配置,但我不确定是什么。
我有一个主节点和两个使用Kubernetes运行CentOS的minion节点:1.2.0-alpha.5。 DNS在minion-2上运行。我正在使用的测试窗格是上面链接中概述的示例。
如果测试吊舱运行在仆从-1(节点WITHOUT DNS)然后DNS产量测试:
$ kubectl exec busybox -- nslookup kubernetes.default
Server: 10.0.0.10
Address 1: 10.0.0.10
nslookup: can't resolve 'kubernetes.default'
error: error executing remote command: Error executing command in container: Error executing in Docker Container: 1
测试吊舱的resolv.conf是:
search default.svc.cluster.local svc.cluster.local cluster.local
nameserver 10.0.0.10
options ndots:5
服务群集IP范围:10.0.0.0/24 法兰绒网络配置:18.16.0.0/16
我已经查看了Kuberentes回购和大多数文档中的大多数DNS问题与DNS有关,但我仍然处于亏损状态。如果任何人都可以提供任何见解或其他文档来查看调试此问题,将不胜感激。
UPDATE 好吧看来这个问题可能是由于我没有正确安装法兰绒。我已经重新启动的设置和验证绒布以下这里列出的说明:我得到https://github.com/kubernetes/kubernetes/blob/v1.2.0-alpha.5/docs/getting-started-guides/fedora/flannel_multi_node_cluster.md
从奴才-1:
$ ip -4 a|grep inet
inet 127.0.0.1/8 scope host lo
inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic enp0s3
inet 172.28.128.9/24 brd 172.28.128.255 scope global enp0s8
inet 18.16.45.0/16 scope global flannel0
inet 18.16.45.1/24 scope global docker0
从奴才-2我得到:
$ ip -4 a|grep inet
inet 127.0.0.1/8 scope host lo
inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic enp0s3
inet 172.28.128.9/24 brd 172.28.128.255 scope global enp0s8
inet 18.16.45.0/16 scope global flannel0
inet 18.16.45.1/24 scope global docker0
这似乎与迄今为止记录的内容相匹配。但是,对于下一步,我没有为每个节点获取一个块。我只看到一个块:
$ curl -s http://172.28.128.8:4001/v2/keys/coreos.com/network/subnets | python -mjson.tool
{
"action": "get",
"node": {
"createdIndex": 15,
"dir": true,
"key": "/coreos.com/network/subnets",
"modifiedIndex": 15,
"nodes": [
{
"createdIndex": 18,
"expiration": "2016-01-13T19:59:09.489854201Z",
"key": "/coreos.com/network/subnets/18.16.45.0-24",
"modifiedIndex": 18,
"ttl": 86272,
"value": "{\"PublicIP\":\"10.0.2.15\"}"
}
]
}
}
所有subnet.env文件似乎匹配 从奴才-1:
$ cat /run/flannel/subnet.env
FLANNEL_NETWORK=18.16.0.0/16
FLANNEL_SUBNET=18.16.45.1/24
FLANNEL_MTU=1472
FLANNEL_IPMASQ=true
从奴才-2:
$ cat /run/flannel/subnet.env
FLANNEL_NETWORK=18.16.0.0/16
FLANNEL_SUBNET=18.16.45.1/24
FLANNEL_MTU=1472
FLANNEL_IPMASQ=true
如果我继续进行下一步验证跨宿主容器通信的方法,最终使用具有相同IP地址的minion-1和minion-2上的容器。这显然是不正确的。
[[email protected] /]# ip -4 a l eth0 | grep inet
inet 18.16.45.2/24 scope global eth0
[[email protected] /]# ip -4 a l eth0 | grep inet
inet 18.16.45.2/24 scope global eth0
法兰绒服务正在启动以下参数如果这能帮助任何:
flanneld --ip-masq -etcd-endpoints=http://172.28.128.8:4001 -etcd-prefix=/coreos.com/network