我一直在尝试使用this guide在OpenStack中为上周左右设置Kubernetes集群。我在处理过程中遇到了一些问题,此问题中描述了其中一个-> kube-up.sh failes in OpenStack
发出./cluster/kube-up.sh
脚本时,它将尝试使用openstack堆栈创建步骤(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文件-> 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中请求闲置 channel 也产生了零结果!
最佳答案
该行是您麻烦的根源,假设您没有在发布之前忽略输出。在非标准端口上运行etcd会使情况变得更糟,但是值得庆幸的是,我认为这两种解决方案实际上是相同的解决方案。
我希望运行systemctl cat flanneld.service
(您可能需要sudo
,具体取决于systemd设置的严格性)才能输出flanneld
的统一系统描述符,包括任何“drop-ins”,覆盖等,如果我的理论正确,则可以它们将是Environment=
或EnvironmentFile=
,这就是我打赌flanneld.service
期望将ETCD_ENDPOINTS=
或FLANNELD_ETCD_ENDPOINTS=
(如seen here)可用的地方。
因此,希望该文件丢失或实际上为空,并且无论哪种情况,您都可以通过迅速的Exec
来告诉flanneld有关etcd端点的知识,而所有一切都将再次恢复正常。
关于docker - Kubernetes Master无法在OpenStack Heat中启动,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/41444866/