Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubeadm not creating /etc/cni/net.d .. pods will fail to load. #74

Closed
adiri opened this issue Nov 29, 2016 · 10 comments
Closed

kubeadm not creating /etc/cni/net.d .. pods will fail to load. #74

adiri opened this issue Nov 29, 2016 · 10 comments

Comments

@adiri
Copy link

adiri commented Nov 29, 2016

I tested kubeadm on CentOS 7, did exactly what the document stated and everything work as expected.

when I created a pod I had the following error:

  1m		1m		4	{kubelet server.name}			Warning		FailedSync	Error syncing pod, skipping: failed to "SetupNetwork" for "appname-a94fb6130669dde66c7ebe8cd697c498463fa721-5rg6i_default" with SetupNetworkError: "Failed to setup network for pod \"appname-a94fb6130669dde66c7ebe8cd697c498463fa721-5rg6i_default(45543fa1-b1fe-11e6-af4d-5254002465aa)\" using network plugins \"cni\": cni config unintialized; Skipping pod"

creating at the master and slaves /etc/cni/net.d fixed the problem.

@fieg
Copy link

fieg commented Nov 30, 2016

I'm experiencing the same on ubuntu xenial.

@adiri what do you mean with "creating /etc/cni/net.d"? Just create an empty directory?

@mikedanese
Copy link
Member

kubeadm doesn't create this, a network daemonset should. Are your running weave or flannel in a daemonset?

@adiri
Copy link
Author

adiri commented Dec 1, 2016

@mikedanese Yes, I applied the weave daemonset (kubectl apply -f https://git.io/weave-kube)

I also tried kubeadm init --pod-network-cidr=10.244.0.0/16 but same problem.

@mikedanese
Copy link
Member

Then this might be a problem with weave-kube cc @errordeveloper @lukemarsden

@matthewrobertbell
Copy link

matthewrobertbell commented Dec 6, 2016

I'm also experiencing this with a fresh Digital Ocean 4GB 16.04 VM (single node cluster). I followed http://kubernetes.io/docs/getting-started-guides/kubeadm/ and didn't install a network daemonset, as it wasn't mentioned as required.

kube-dns and kube-dashboard are the pods that fail to come up.

I hope that helps.

Edit: I see a network daemonset is required, my mistake.

Second edit: Starting from scratch, after kubeadm init, I installed flannel with kubectl create -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml

After this, kube-dns has still failed, presumably because it didn't retry. Is it a bug to try and setup kube-dns (which relies on a network daemonset), before there is a network daemonset?

@damaspi
Copy link

damaspi commented Dec 31, 2016

On an Ubuntu 16.04.1 LTS, with a master and 3 nodes in an internal static network (192.168.2.99 to 102) but having each also an IP address directly on the Internet, I have installed k8 (1.5.1), then initiated with
kubeadm init --api-advertise-addresses=192.168.2.99
to link the cluster on the internal network and not expose it.

I then installed my weave-kube by typing
kubectl apply -f https://git.io/weave-kube

kubectl get pods --namespace=kube-system shows that everything seems to be ok, but when I add successfully the nodes, I see regular crashes of the weave-net-xxxx pods.

When I deploy some demo application, I have the same message as above. (Error syncing pod, skipping: failed to "SetupNetwork" ).

When I check the logs of the proxy pod, kubectl logs kube-proxy-g7qh1 --namespace=kube-system I get the following info: proxier.go:254] clusterCIDR not specified, unable to distinguish between internal and external traffic

The test for an empty clusterCIDR in pkg/proxy/iptables/proxier.go seems rather recent, so is kubeadm adapted to ensure that this flag is properly set? In the templates (.json), I don't find it and I don't know where to add this flag to ensure that it is properly taken by the proxy...

@pires
Copy link
Contributor

pires commented Jan 4, 2017

@damaspi i've opened #102 to address your issue as it's not related to this one.

@luxas
Copy link
Member

luxas commented Jan 5, 2017

kubeadm should not create the /etc/cni/net.d directory; that's a task for the CNI DaemonSet plugins.

And the other issue that's faced here is handled in #102

@luxas luxas closed this as completed Jan 5, 2017
@funnydevnull
Copy link

I am having similar problems but only when I use an internal IP address for kubeadm init --api-advertise (I have two interfaces, one internal one external). Is this related to #102?

@luxas
Copy link
Member

luxas commented Jan 13, 2017

@funnydevnull I can't say, please open a new issue with more details and we'll see

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants