Missing CNI plugins binaries
danilo404 opened this issue · comments
I think the tutorial to install Kubernetes in Container Linux is missing a step. The step by step tutorial does not mention anything about the following situation:
After installing the Kubernetes cluster using the tutorial, the pods fail to start with the following messages:
Events:
FirstSeen LastSeen Count From SubObjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
6m 6m 1 default-scheduler Normal Scheduled Successfully assigned mypodXXXX to x.x.x.x
6m 3m 117 kubelet, x.x.x.x Warning FailedSync Error syncing pod, skipping: failed to "SetupNetwork" for "mypodXXXX" with SetupNetworkError: "Failed to setup network for pod \"mypodXXXX\" using network plugins \"cni\": failed to find plugin \"loopback\" in path [/opt/loopback/bin /opt/cni/bin]; Skipping pod"
3m 2s 224 kubelet, x.x.x.x Warning FailedSync Error syncing pod, skipping: failed to "SetupNetwork" for "mypodXXXX" with SetupNetworkError: "Failed to setup network for pod \"mypodXXXX\" using network plugins \"cni\": failed to find plugin \"bridge\" in path [/opt/cni/bin /opt/flannel/bin]; Skipping pod"
After manually downloading the cni plugin binaries v0.4.0 package from https://github.com/containernetworking/cni/releases/tag/v0.4.0 and unpacking it to /opt/cni/bin
the pods deploy correctly.
More details:
Operating System: Container Linux by CoreOS stable (1353.7.0)
Tutorial Version 1.5.4
Kubernetes Version 1.5.4
You actually don't have to manually download CNI plugins. They are embedded in hypercube images. If you just remove following lines from the kubelet.service
CNI should work fine:
--volume cni-bin,kind=host,source=/opt/cni/bin \
--mount volume=cni-bin,target=/opt/cni/bin
But obviously the tutorial is (was?) wrong requesting mounting cni-bin
volume. It is only necessary when you want to alter plugin set.