无法创建Pod沙箱kubernetes错误

时间:2019-01-31 12:44:49

标签: kubernetes weave

我有一个Ubuntu 16.04,它是kubernetes的主人。我已经安装了kuber v1.13.1并使用weave进行网络连接。我有2台Raspberry pi设备运行相同版本的kubernetes。我创建了一个集群,并将树莓派加入了Ubuntu kube master。我已经开始部署,一切看起来都很好。

当我检查容器的日志时,发现它无法连接到Internet。我尝试ping但没有结果。当我运行命令来描述Pod时,我得到了以下信息:

Warning FailedCreatePodSandBox 42m (x3 over 42m) kubelet, node02 (combined from similar events): Failed create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "dea99f80488031b84b7b1f934343e54d877adf931071401651628505d52f55f9" network for pod "deployment-cnfc5": NetworkPlugin cni failed to set up pod "deployment-cnfc5_matrix-device" network: unable to allocate IP address: Post http://127.0.0.1:6784/ip/dea99f80488031b84b7b1f934343e54d877adf931071401651628505d52f55f9: dial tcp 127.0.0.1:6784: connect: connection refused

我已经检查了目录/etc/cni/net.d,它在主节点和工作节点上都包含10-weave.conflist。我还检查了目录/opt/cni/bin,并在下面的master节点上找到了

bridge flannel ipvlan macvlan ptp tuning weave-ipam weave-plugin-2.5.1 dhcp host-local loopback portmap sample vlan weave-net

关于工人,我得到了以下信息:

bridge flannel ipvlan macvlan ptp tuning weave-ipam weave-plugin-2.5.0 dhcp host-local loopback portmap sample vlan weave-net weave-plugin-2.5.1

请任何人让我知道如何解决此问题。谢谢。

我通过使用以下命令启动了kube master:

sudo kubeadm init --token-ttl=0 --apiserver-advertise-address=192.168.0.142

并使用以下方法安装编织:

kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"

0 个答案:

没有答案
相关问题