Kuberntes掌握不在OpenStack加热

时间:2017-01-03 13:41:48

标签: docker kubernetes openstack openstack-heat flannel

我一直在尝试使用this guide在OpenStack的最后一周左右设置一个Kubernetes集群。我在这个过程中遇到了一些问题,其中一个问题在这个问题中有所描述 - > kube-up.sh failes in OpenStack

在发出./cluster/kube-up.sh脚本时,它会尝试使用openstack stack create步骤(Log)启动集群。在这里,出于某种原因,kubernetes master无法正常启动,这里安装失败。我能够通过SSH进入主节点并在/var/log/cloud-init-output.log

中找到它
[..]
Complete!
*  INFO: Running install_centos_stable_post()
*  INFO: Running install_centos_check_services()
*  INFO: Running install_centos_restart_daemons()
*  INFO: Running daemons_running()
*  INFO: Salt installed!
2017-01-02 12:57:31,574 - cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
2017-01-02 12:57:31,576 - util.py[WARNING]: Running scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python2.7/site-packages/cloudinit/config/cc_scripts_user.pyc'>) failed
Cloud-init v. 0.7.5 finished at Mon, 02 Jan 2017 12:57:31 +0000. Datasource DataSourceOpenStack [net,ver=2].  Up 211.20 seconds

在进一步挖掘时,我在/ var / log / messages文件中找到了这个片段 - &gt; https://paste.ubuntu.com/23733430/

所以我假设Docker守护进程没有启动。还有一些事情搞砸了我的etcd配置,因为flanneld服务也没有启动。这是service flanneld status

的输出
● flanneld.service - Flanneld overlay address etcd agent
Loaded: loaded (/usr/lib/systemd/system/flanneld.service; enabled; vendor preset: disabled)
Active: activating (start) since Tue 2017-01-03 13:32:37 UTC; 48s ago
Main PID: 15666 (flanneld)
CGroup: /system.slice/flanneld.service
       └─15666 /usr/bin/flanneld -etcd-endpoints= -etcd-prefix= -iface=eth0 --ip-masq

Jan 03 13:33:16 kubernetesstack-master flanneld[15666]: E0103 13:33:16.229827 15666 network.go:53] Failed to retrieve network config: client: etcd cluster is unavailable or misconfigured
Jan 03 13:33:17 kubernetesstack-master flanneld[15666]: E0103 13:33:17.230082 15666 network.go:53] Failed to retrieve network config: client: etcd cluster is unavailable or misconfigured
Jan 03 13:33:18 kubernetesstack-master flanneld[15666]: E0103 13:33:18.230326 15666 network.go:53] Failed to retrieve network config: client: etcd cluster is unavailable or misconfigured
Jan 03 13:33:19 kubernetesstack-master flanneld[15666]: E0103 13:33:19.230560 15666 network.go:53] Failed to retrieve network config: client: etcd cluster is unavailable or misconfigured
Jan 03 13:33:20 kubernetesstack-master flanneld[15666]: E0103 13:33:20.230822 15666 network.go:53] Failed to retrieve network config: client: etcd cluster is unavailable or misconfigured
Jan 03 13:33:21 kubernetesstack-master flanneld[15666]: E0103 13:33:21.231325 15666 network.go:53] Failed to retrieve network config: client: etcd cluster is unavailable or misconfigured
Jan 03 13:33:22 kubernetesstack-master flanneld[15666]: E0103 13:33:22.231581 15666 network.go:53] Failed to retrieve network config: client: etcd cluster is unavailable or misconfigured
Jan 03 13:33:23 kubernetesstack-master flanneld[15666]: E0103 13:33:23.232140 15666 network.go:53] Failed to retrieve network config: client: etcd cluster is unavailable or misconfigured
Jan 03 13:33:24 kubernetesstack-master flanneld[15666]: E0103 13:33:24.234041 15666 network.go:53] Failed to retrieve network config: client: etcd cluster is unavailable or misconfigured
Jan 03 13:33:25 kubernetesstack-master flanneld[15666]: E0103 13:33:25.234277 15666 network.go:53] Failed to retrieve network config: client: etcd cluster is unavailable or misconfigured

我的etcd守护程序正在运行:

[root@kubernetesstack-master salt]# netstat -tanlp | grep etcd
tcp        0      0 192.168.173.3:4379      0.0.0.0:*               LISTEN      20338/etcd
tcp        0      0 192.168.173.3:4380      0.0.0.0:*               LISTEN      20338/etcd

虽然它在非标准端口上运行。

我也在代理下的公司网络中。任何有关如何进一步调试这一点的指示表示赞赏。到目前为止,我已经达成了如何处理这个问题的死胡同。询问kubernetes松弛的渠道也产生了零结果!

1 个答案:

答案 0 :(得分:0)

  

/usr/bin/flanneld -etcd-endpoints=

假设您在发布之前没有删除输出,那么该行就是您的麻烦的来源。在非标准端口上运行的etcd使你的情况变得更糟,但幸运的是我认为两者的解决方案实际上都是同样的解决方案。

我希望运行systemctl cat flanneld.service(您可能需要sudo,具体取决于系统设置的严格程度)输出flanneld的统一systemd描述符,包括任何“drop-ins” “,覆盖等,如果我的理论是正确的,其中一个将是Environment=EnvironmentFile=,这就是我打赌flanneld.service期望有ETCD_ENDPOINTS=FLANNELD_ETCD_ENDPOINTS=可以使用Execseen here}。

所以希望这个文件丢失或者实际上是空白的,在任何一种情况下,你都可以快速vi教授关于你的etcd端点的flanneld,并且世界上的一切都很好。