I'm installing kubernetes(kubeadm) on centos VM runing inside Virtualbox, so with yum i installed kubeadm, kubelet and docker.

Now while trying to setup cluster with kubeadm init --pod-network-cidr= --apiserver-advertise-address= i run into the following error :

Unable to update cni config: No networks found in /etc/cni/net.d

Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized

So i checked, no cni folder in /etc even that kubernetes-cni-0.6.0-0.x86_64 is installed. I Tried commenting KUBELET_NETWORK_ARGS in /etc/systemd/system/kubelet.service.d/10-kubeadm.conf but it didn't work.


  • I'm installing behind proxy.

  • I have multiple network adapters:

    • NAT : for Internet

    • Host Only :

    • And docker interface :

Docker version: 17.12.1-ce
kubectl version : Major:"1", Minor:"9", GitVersion:"v1.9.3"
Centos 7

  • 1
    sorry, but the pod network is an overlay network and need to be different from your host only network – c4f4t0r Mar 6 '18 at 10:36
  • runing kubeadm init with no arguments return the same error – BOUKANDOURA Mhamed Mar 6 '18 at 10:47
  • I am using kubernetes 1.9.3 and I used kubeadm init --pod-network-cidr= and I used flannel as network addon – c4f4t0r Mar 7 '18 at 9:20

It was a proxy error as mentionned in Github https://github.com/kubernetes/kubernetes/issues/34695

They suggested to use kubeadm init --use-kubernetes-version v1.4.1 but i change my network entirely (no proxy) and i manage to setup my cluster.

And as @Radek mentionned before, seting up pod network with kubectl apply -f .... came after the initialization of cluster.


reason:NetworkPluginNotReady - you need to install a networking solution into kubeadm provisioned cluster before anything else can start up.

Using kubeadm to Create a Cluster - Installing a pod network | Kubernetes

  • I'm having this error The connection to the server localhost:8080 was refused - did you specify the right host or port? In every execution of kubectl. Trying to install pod network (weave) with kubectl apply -f ... didn't work. – BOUKANDOURA Mhamed Mar 6 '18 at 12:47
  • the error in your comment means that you probably have no valid config in ~/.kube/config (or it points to localhost:8080 and no api is there which is the less likely scenario) – Radek 'Goblin' Pieczonka Mar 7 '18 at 8:11

seems a docker image is missing.

check if the images have been downloaded into your machines(VM)

docker image list or kubeadm config images list

expected image: quay.io/coreos/flannel v0.10.0-amd64.

pls refer to offical doc for more images required

if the image is missing, pls download it manually.

docker pull quay.io/coreos/flannel:v0.10.0-amd64

for more images: kubeadm config images pull

Then, restart


none of the above solutions didn't worked for me. I found out that my server does not have default route!

# route -n     U     1000   0        0 wlp9s0     U     0      0        0 docker0

so I added the default gateway by the following command:

# route add default gw
# route -n         UG    600    0        0 wlp9s0     U     1000   0        0 wlp9s0     U     0      0        0 docker0

right now the iptables works fine

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.