法兰绒和码头工人没有开始

前端之家收集整理的这篇文章主要介绍了法兰绒和码头工人没有开始前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

我正在尝试使用http://severalnines.com/blog/installing-kubernetes-cluster-minions-centos7-manage-pods-services的指南在2个节点上建立一个kubernetes集群,centos 7.1.但是,当我尝试在minion上启动服务时,如下所示:

for SERVICES in kube-proxy kubelet docker flanneld; do
    systemctl restart $SERVICES
    systemctl enable $SERVICES
    systemctl status $SERVICES 
done

我收到以下错误

-- Logs begin at Wed 2015-12-23 13:00:41 UTC,end at Wed 2015-12-23 16:03:54 UTC. --
Dec 23 16:03:47 sc-test2 systemd[1]: docker-storage-setup.service: main process exited,code=exited,status=1/FAILURE
Dec 23 16:03:47 sc-test2 systemd[1]: Failed to start Docker Storage Setup.
-- Subject: Unit docker-storage-setup.service has Failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker-storage-setup.service has Failed.
-- 
-- The result is Failed.
Dec 23 16:03:47 sc-test2 systemd[1]: Unit docker-storage-setup.service entered Failed state.
Dec 23 16:03:48 sc-test2 flanneld[36477]: E1223 16:03:48.187350 36477 network.go:53] Failed to retrieve network config: 100: Key not found (/atomic.io)
Dec 23 16:03:49 sc-test2 flanneld[36477]: E1223 16:03:49.189860 36477 network.go:53] Failed to retrieve network config: 100: Key not found (/atomic.io)
Dec 23 16:03:50 sc-test2 flanneld[36477]: E1223 16:03:50.192894 36477 network.go:53] Failed to retrieve network config: 100: Key not found (/atomic.io)
Dec 23 16:03:51 sc-test2 flanneld[36477]: E1223 16:03:51.194940 36477 network.go:53] Failed to retrieve network config: 100: Key not found (/atomic.io)
Dec 23 16:03:52 sc-test2 flanneld[36477]: E1223 16:03:52.197222 36477 network.go:53] Failed to retrieve network config: 100: Key not found (/atomic.io)
Dec 23 16:03:53 sc-test2 flanneld[36477]: E1223 16:03:53.199248 36477 network.go:53] Failed to retrieve network config: 100: Key not found (/atomic.io)
Dec 23 16:03:54 sc-test2 flanneld[36477]: E1223 16:03:54.201160 36477 network.go:53] Failed to retrieve network config: 100: Key not found (/atomic.io)

我确定我在主人身上设置了关键:
etcdctl mk /coreos.com/network/config'{“Network”:“172.17.0.0/16”}’

到目前为止安装似乎是使用kubernetes最难的一点:(

最佳答案
今天的圣诞节,但我花了一整天努力让这个工作:)这就是我做的:

#1 FLANNEL

如上所述,我在主人身上设置法兰绒etcd键:

etcdctl mk /coreos.com/network/config'{“Network”:“172.17.0.0/16”}’

但是当我试图在奴才上开始法兰绒时我得到了这个错误

无法检索网络配置:100:找不到密钥(/atomic.io)

所以我编辑了minion上的/ etc / sysconfig / flanneld文件

# Flanneld configuration options  

# etcd url location.  Point this to the server where etcd runs
FLANNEL_ETCD="http://master:2379"

# etcd config key.  This is the configuration key that flannel queries
# For address range assignment
FLANNEL_ETCD_KEY="/coreos.com/network"

# Any additional options that you want to pass
#FLANNEL_OPTIONS=""

to:

# Flanneld configuration options  

# etcd url location.  Point this to the server where etcd runs
FLANNEL_ETCD="http://master:2379"

# etcd config key.  This is the configuration key that flannel queries
# For address range assignment
FLANNEL_ETCD_KEY="/atomic.io/network"

# Any additional options that you want to pass
#FLANNEL_OPTIONS=""

即更改了FLANNEL_ETCD键.

在此systemctl启动后,flanneld工作.

#2 DOCKER

我找不到通过kubernetes工作将版本作为依赖项安装的方法,所以我卸载它并遵循Centos安装的docker-engine的docker文档并手动为systemctl创建docker.service文件.

cd /usr/lib / systemd / system

和docker.service的内容

[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network.target docker.socket
Requires=docker.socket
Requires=flanneld.service
After=flanneld.service

[Service]
EnvironmentFile=/etc/sysconfig/flanneld
ExecStart=/usr/bin/docker daemon -H fd:// --bip=${FLANNEL_SUBNET}
Restart=on-failure
RestartSec=5


[Install]
WantedBy=multi-user.target

然后启动并使用systemctl启用守护程序以及查询状态.

systemctl restart docker
systemctl enable docker
systemctl status docker
原文链接:https://www.f2er.com/docker/436594.html

猜你在找的Docker相关文章