Kubernetes open /run/flannel/subnet.env: no such file or directory

9/25/2018

So far this link doesn't work:

kubectl create -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel-rbac.yml

Is there an alternative way to fix this error:

Warning FailedCreatePodSandBox 1d kubelet, node2 Failed create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "99e30671c80ab8fe5cedd54fb4edd2ce99ebc45ed120e912d2c7e51f2cab350a" network for pod "node1-6777d4468-d6tvq": NetworkPlugin cni failed to set up pod "node1-6777d4468-d6tvq_default" network: open /run/flannel/subnet.env: no such file or directory
-- James Lin
kubernetes
pod

1 Answer

9/25/2018

Are you sure you're running / using flannel for your kubernetes networking...?

It's complaining about not being able to find /run/flannel/subnet.env which should be available if flannel is running.

-- Charlino
Source: StackOverflow