Kubernetes "no IP addresses available in network: podnet; Skipping pod"

1/4/2017

I have a 2-host coreos powered k8s setup just like here: https://coreos.com/kubernetes/docs/latest/getting-started.html

It is was setup to work with jenkins kubernetes plugin and after a while I got it to work. It was scheduling containers on the master just fine. Then I left it over the weekend and after coming back to it found that containers are now trying to get scheduled on the other node (not master) but they fail to sync.

kubectl describe pod jenkinsminions-1582d1b3b52f79

enter image description here

But I only have 8 docker containers running on the master and 4 on the slave. I shouldn't have been able to deplete all the IP address space there is. How would I proceed with troubleshooting from here? Should I try to change the pod network from 10.x.x.x to 172.x.x.x?

UPDATES

Both nodes in the cluster are responsive via kubectl and etcd.

etcdctl get /coreos.com/network/config
{"Network":"10.2.0.0/16","Backend":{"Type":"vxlan"}}

etcdctl ls /coreos.com/network/subnets
/coreos.com/network/subnets/10.2.44.0-24
/coreos.com/network/subnets/10.2.96.0-24

Also I observe cni network interface to only be present on the minion node.

-- user3081519
kubernetes

1 Answer

3/30/2017

I believe it is CNI config inconsistent, you could clean files in /etc/cni/net.d/ and restart your cluster. Also I found your issue report in kubernetes community, I post it here for anyone who meet the same issue. https://github.com/kubernetes/kubernetes/issues/39557

-- Crazykev
Source: StackOverflow