-1

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
Jonas
  • 121,568
  • 97
  • 310
  • 388
James Lin
  • 1
  • 1
  • 1
  • What are you trying to do? It looks like you are applying an RBAC rule that doesn't exist on github. Yet you have an error of creating pods – Rico Sep 25 '18 at 21:17
  • Might be a little late for you, but i wanted to share: In my case this problem was related to a wrong _Docker-Kubernetes_ setup, which caused containers like `CoreDNS` to be stuck in _ContainerCreation_. My full answer can be found [here](https://stackoverflow.com/a/60049037/3757672). – Markus Feb 05 '20 at 10:01

1 Answers1

0

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
  • 15,802
  • 3
  • 58
  • 74
  • I have successfully been running flannel with kubelet 1.12 and doker 18.06 on ubuntu 18.04, but upgrading to kubelet 1.13 and docker 18.09 makes kubernetes fail to start flannel and coredns, with the error that /run/flannel/subnet.env doesn't exist, and indeed, the /run/flannel directory doesn't exist. Conclusion: Something's supposed to create this directory, but doesn't. – Jon Watte Jan 15 '19 at 23:30