CentOS 7 Kubernetes Setup Error

按照以下链接中的步骤

http://kubernetes.io/docs/getting-started-guides/centos/centos_manual_config/

走到

Start the appropriate services on node (centos-minion-n).
for SERVICES in kube-proxy kubelet flanneld docker; do
    systemctl restart $SERVICES
    systemctl enable $SERVICES
    systemctl status $SERVICES
done

时候报错如下:

 systemd[1]: Dependency failed for Kubernetes Kubelet Server. -- Subject: Unit kubelet.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit kubelet.service has failed.

 

使用以下命令查看具体错误信息:

systemctl status docker -l

错误信息:

Error initializing network controller: Error creating default \"bridge\" network: cannot create network docker0 (3957ed36665a4b84d522807cc1e4f65c8d7e06ad9e4ce9e993b7bfafc6baa489): conflicts with network d7f59ab014ac2171210c0af56b74d7646a95f2090bf559a02290c0694ac094d5 (docker0): networks have same bridge name"

 

原因:

网络冲突。

解决方法:

删除原有的网络,并重新启动kubernetes相关服务:

rm -rf /var/lib/docker/network 

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

 

继续下面的配置,并在master机器使用以下命令查看集群状态:

kubectl get nodes

 

转载于:https://www.cnblogs.com/flasheryu/p/6022313.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值