Viktor Login
Viktor Login

Reputation: 25

Docker CNI: Failed to setup network

Why can not I create a network for the new pods?

Error syncing pod, skipping: failed to "SetupNetwork" for "kube-dns-v11-n4yp4_kube-system" 
with SetupNetworkError: "Failed to setup network for 
pod \"kube-dns-v11-n4yp4_kube-system(841109e1-2d93-11e6-8393-080027ad62c7)\" 
using network plugins \"cni\": could not find \".\" plugin; Skipping pod"

Upvotes: 1

Views: 10910

Answers (1)

Casey Davenport
Casey Davenport

Reputation: 131

Usually that error occurs when the CNI network config file is either missing or malformed, or when the plugin binary referenced in the CNI network config file is missing.

Make sure you have a valid CNI network config file in /etc/cni/net.d, and make sure the plugin binary for the type specified in that file exists in /opt/cni/bin.

You can find an example CNI network config file for Calico here: https://github.com/projectcalico/calico-containers/blob/master/docs/cni/kubernetes/KubernetesIntegration.md#2-download-and-configure-the-calico-cni-plugin

So, for Calico you should have a CNI config file in /etc/cni/net.d with type: calico specified, and then the Calico CNI binary installed at /opt/cni/bin/calico

Upvotes: 2

Related Questions