大家好, 问题出现在用阿里云ECS搭建kubernetes集群环境时候, 我这里用三台阿里云centos服务器分别做1个master和2个node节点; node节点的kube-calico服务连接master节点的etcd时候报错: kube-calico bird: Mesh_172_26_178_195: Socket error: bind: Address not available [closed];下面是主节点etcd配置,通过错误大概知道是从节点跟主节点的连接问题;有一点应该注意的是,下面etcd中--listen-client-urls的IP(172.26.178.195)是master节点的内网IP,因为如果写公网IP会报错,但是这样的话,从节点就会报Socket error: bind: Address not available [closed];
master上面的etcd配置: Description=Etcd Server After=network.target After=network-online.target Wants=network-online.target Documentation=https://github.com/coreos
[Service] Type=notify WorkingDirectory=/var/lib/etcd/ ExecStart=/root/kubernetes/bin/etcd
--name=172.26.178.195
--listen-client-urls=http://172.26.178.195:2379,http://127.0.0.1:2379
--advertise-client-urls=http://172.26.178.195:2379
--data-dir=/var/lib/etcd Restart=on-failure RestartSec=5 LimitNOFILE=65536
其他信息: master: Calico process is running.
IPv4 BGP status +----------------+-------------------+-------+----------+---------+ | PEER ADDRESS | PEER TYPE | STATE | SINCE | INFO | +----------------+-------------------+-------+----------+---------+ | 47.105.223.158 | node-to-node mesh | start | 02:49:30 | Connect | | 47.105.189.58 | node-to-node mesh | start | 02:49:30 | Connect | +----------------+-------------------+-------+----------+---------+
IPv6 BGP status No IPv6 peers found.
node: Calico process is running.
IPv4 BGP status +----------------+-------------------+-------+----------+--------------------------------+ | PEER ADDRESS | PEER TYPE | STATE | SINCE | INFO | +----------------+-------------------+-------+----------+--------------------------------+ | 47.105.189.58 | node-to-node mesh | start | 03:54:15 | Active Socket: Connection | | | | | | closed | | 172.26.178.195 | node-to-node mesh | start | 03:54:15 | Active Socket: Connection | | | | | | closed | +----------------+-------------------+-------+----------+--------------------------------+
IPv6 BGP status No IPv6 peers found.
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。