Calico NetworkPlugin cni failed on the status hook for pod 'nginx' - invalid CIDR address: Device "eth0" does not exist

7/3/2016

I have the following kubelet error on my minions:

Jul 02 16:20:42 sc-minion-1 kubelet[46142]: E0702 16:20:42.899902 46142 manager.go:309] NetworkPlugin cni failed on the status hook for pod 'nginx' - invalid CIDR address: Device "eth0" does not exist.

My 10-calico.conf on all nodes looks like this:

{
    "name": "calico-k8s-network",
    "type": "calico",
    "etcd_authority": "172.1.1.4:6666",
    "log_level": "info",
    "ipam": {
        "type": "calico-ipam"
    }
}

I also ran: calicoctl pool add 192.168.0.0/16 --ipip --nat-outgoing on all nodes.

-- Jonathan
calico
kubernetes
project-calico

1 Answer

7/6/2016

The error you show from the kubelet logs is common and usually benign, so long as it isn't repeated in the logs for the same pod. This issue in the Kubernetes repo contains more information: https://github.com/kubernetes/kubernetes/issues/25281

Your Calico configuration looks right to me. You did however mention that you're running on Azure. At the moment, Calico ipip mode won't work on Azure due to a limitation in the underlying network fabric (see https://github.com/projectcalico/calico-containers/issues/949)

You could probably use something like the canal project - flannel vxlan, with Calico on top to implement policy. Or wait until azure supports Calico natively as mentioned in the above issue.

-- Casey Davenport
Source: StackOverflow