Problem scenario
You run kubectl describe pods. You see a message in the output that says
networkPlugin cni failed to set up pod network: open /run/flannel/subnet.env: no such file or directory.
How do you fix this?
Possible Solution #1
Log into every worker node. Make sure it has /run/flannel/subnet.env with the following four lines:
FLANNEL_NETWORK=10.244.0.0/16
FLANNEL_SUBNET=10.244.0.1/24
FLANNEL_MTU=1450
FLANNEL_IPMASQ=true
(This solution was adapted from https://www.programmersought.com/article/7824768991/)
Possible Solution #2
Run this: kubectl get pods.
…