我有一个集群,在Raspberry pi
上有10个工作节点,主节点在Ubuntu 16.04
上运行。一切似乎都很好,但有时在节点上运行的Pod显示以下错误:Warning FailedCreatePodSandBox 18m (x3 over 18m) kubelet, w188 (combined from similar events): Failed create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "6fa511fb1d292702aa99318b785f5011307601868ff2520c542515a239924c16" network for pod "deployment-6w24f": NetworkPlugin cni failed to set up pod "deployment-6w24f_aps-namespace" network: unable to allocate IP address: Post http://127.0.0.1:6784/ip/6fa511fb1d292702aa99318b785f5011307601868ff2520c542515a239924c16: dial tcp 127.0.0.1:6784: connect: connection refused
个
我正在使用weave进行网络连接,它在kube dashboard上显示以下错误:Readiness probe failed: Get http://127.0.0.1:6784/status: dial tcp 127.0.0.1:6784: connect: connection refused Back-off restarting failed container MountVolume.SetUp failed for volume "weave-net-token-txqhk" : couldn't propagate object cache: timed out waiting for the condition
个
该节点显示此错误,一段时间后,它开始自动正常工作。这是不时发生的多个节点。我使用下面的命令初始化集群和编织:
sudo kubeadm init --token-ttl=0 --apiserver-advertise-address=192.168.8.12
kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
字符串
有没有人可以指导我如何解决这个问题。
2条答案
按热度按时间o3imoua41#
对我有效的方法是使用我的
kube-dns
服务的IP范围添加iptable
规则。字符串
由于kube-dns的IP是
10.96.0.10
,那么iptable规则的有效范围将是10.96.0.1/32
型
关于这个问题的更多信息可以在here中找到。
nzkunb0c2#
在我的情况下,我错过了删除每个节点上的
/etc/cni/net.d/10-aws.conflist
文件。总之,我们需要遵循以下步骤:
1.删除每个节点上的
/etc/cni/net.d/10-aws.conflist
1.重启kube-proxy pod
1.安装Weave Net资源。例如:kubectl apply -f https://github.com/weaveworks/weave/releases/download/v2.8.1/weave-daemonset-k8s.yaml
在AWS EKS集群上安装Weave Net的官方文档