-
Notifications
You must be signed in to change notification settings - Fork 38.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kube-dns ContainerCreating /run/flannel/subnet.env no such file #36575
Comments
kubeadm uses weave by default. You should try specifying the --pod-network-cidr= to make it use flannel instead. http://kubernetes.io/docs/getting-started-guides/kubeadm/ I'm not sure if that will work but worth a shot. |
I can confirm that passing the |
What is the solution to this issue? |
I had both flannel and weave-net in cni folder. So I removed /etc/cni/net.d/flannel and kept only weave-net and it helped. |
I also have the exact same problem and i'm not sure why... I've done exactly what @kolisko did and i'm still seeing
This occurs on a fresh install for me. |
I had similar issue using kubeadm and resolved it. If you are using flannel then you need to use --pod-network-cidr= flag to kubeadm as @smerrill said. I tried to use weave and still had the same issue as @carldanley. Then I realized had remnant flannel conf in /etc/cni/netd.d/ 10-flannel.conf from my previous attempt to configure kube. I removed that flannel conf and kube dns came up fine. |
Also when joining the minions to the cluster. kubeadm join complains /etc/kubernetes is not empty and failed to join the minion. using --skip-preflight-checks option to join command resolves it. [root@kube-vm2 ~]# kubeadm join --token= |
Has anyone fixed this issue? I tried to join the cluster using the network-cidr= and still receiving the following when I inspect the kube-dns pod 1m 0s 106 {kubelet ubuntu-kub-1} Warning FailedSync Error syncing pod, skipping: failed to "SetupNetwork" for "kube-dns-654381707-b3phy_kube-system" with SetupNetworkError: "Failed to setup network for pod "kube-dns-654381707-b3phy_kube-system(b137457b-b8b1-11e6-a06e-080027b67fcd)" using network plugins "cni": cni config unintialized; Skipping pod" |
Are you using flannel and specifying --pod-network-cidr= flag to kubeadm or some other CNI add-on? |
@burnyd, You must install a pod network. I had configured and setup couple of k8s clusters successfully using kubeadm with flannel and weave as pod network. Here are my suggestions and couple of troubleshooting tips. Hope this helps. If you can paste your pod logs or events that would help debug your problem further.
If flannel pod is not running clean, you need to look at the pod's logs to figure out what is going on. Few things you can check while debugging flannel pod startup or pod network communication issues If flannel is up and running but kube-dns still spitting out "cni: cni config unintialized; Skipping pod" errors then you have to check each containers [kube-dns dnsmasq healthz] logs in kube-dns pod to see what is going on. |
Thanks @vincipdx . I follow your guide and its running now.
|
@RobinLe , Glad to hear my suggestion were helpful and you were able to get kubernetes up and running. I am working on writing an article on Kubenernestes : Troubleshooting and debugging. Hoping to finish this up soon and publish it. |
--pod-network-cidr= worked for me. Thanks! |
Thank you @vincipdx, installing from the official guide this is no so clear |
@inge4pres unfortunately it's described in docs: https://kubernetes.io/docs/getting-started-guides/kubeadm/
https://kubernetes.io/docs/admin/kubeadm/
|
Hi @alexanderilyin saw that later when re-reading. |
Hi, I am running in a problem even though I used the --pod-network-cidr option with init.
I can't ping between the master and minions. Any suggestion? |
@rothgar you mentioned that
Do you know if that's made explicit anywhere? I wasn't able to find a reference to Weave being the default in any of:
I'm just wondering if I'm missing something or if it should be made explicit in one of those guides. |
@everett-toews The doc doesn't explicitly say which overlay it uses. I think in an ideal world the user wouldn't have to care but obviously that's not always the case. I would agree there probably should be a note somewhere on the page that the default is weave just to let people know a little bit about what they're deploying |
@rothgar @everett-toews Arriving late but I have to pushback on You can choose to deploy whatever networking solution you want as long as it satisfies CNI. At one moment in time, Weave was used as an example of what network provider you could use. We later removed that because Kubernetes should be neutral and not recommend any specific solution. That said, I think this issue describes a flannel bug that has been fixed in newer flannel versions, so closing. If the problem persists, reopen in the kubeadm or flannel repo. |
I had this problem as well. Solution in last line. Issue: This resulted in the following errors: kubectl describe pods coredns-576cbf47c7-8frqd kubectl logs -n kube-system coredns-576cbf47c7-8frqd See inconsistency in installation: Solution: |
This has solved the issue for me, when flannel failed to come up. Refer the thread for more info: kubernetes/kubeadm#338 |
Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see http://kubernetes.io/docs/troubleshooting/.):
BUG REPORT
What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.):
kube-dns kubernetes setupnetworkerror flannel subnet.env no such file
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
BUG REPORT
Kubernetes version (use
kubectl version
):Environment:
VMWare Fusion for Mac
uname -a
):Install tools:
Others:
What happened:
What you expected to happen:
kube-dns Running
How to reproduce it (as minimally and precisely as possible):
Anything else do we need to know:
First time I ran
and then downloaded kube-flannel.yml and apply
And then tried to join nodes. Then I reset configuration by
Then tried to initialize kubernetes again using weave.
The text was updated successfully, but these errors were encountered: