Skip to content
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

kubeadm 1.6.0 I created pods network failed,kube-flannel CrashLoopBackOff #44029

Closed
xilu0 opened this issue Apr 4, 2017 · 5 comments
Closed

Comments

@xilu0
Copy link

xilu0 commented Apr 4, 2017

hi,
I created the kubernetes cluster 1.6.0 by using kubeadm kubeadm init.

I created pods network failed,Previous steps are successful, I turn off selinux

[root@kube-master home]# kubectl get pods --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE kube-system etcd-kube-master 1/1 Running 0 1h kube-system kube-apiserver-kube-master 1/1 Running 0 1h kube-system kube-controller-manager-kube-master 1/1 Running 0 1h kube-system kube-dns-3913472980-fzq6r 3/3 Running 0 1h **kube-system kube-flannel-ds-lqtz9 1/2 CrashLoopBackOff 19 1h** kube-system kube-proxy-c6rx2 1/1 Running 0 1h kube-system kube-scheduler-kube-master 1/1 Running 0 1h
I am getting error messages in /var/log/messages.
Apr 4 04:50:34 kube-master kubelet: I0404 04:50:34.631242 3880 kuberuntime_manager.go:752] Back-off 5m0s restarting failed container=kube-flannel pod=kube-flannel-ds-lqtz9_kube-system(878ce510-1909-11e7-a7cc-fa163e6824ce) Apr 4 04:50:34 kube-master kubelet: E0404 04:50:34.631294 3880 pod_workers.go:182] Error syncing pod 878ce510-1909-11e7-a7cc-fa163e6824ce ("kube-flannel-ds-lqtz9_kube-system(878ce510-1909-11e7-a7cc-fa163e6824ce)"), skipping: failed to "StartContainer" for "kube-flannel" with CrashLoopBackOff: "Back-off 5m0s restarting failed container=kube-flannel pod=kube-flannel-ds-lqtz9_kube-system(878ce510-1909-11e7-a7cc-fa163e6824ce)"

I am getting error messages in container.
E0404 08:42:23.017527 1 main.go:127] Failed to create SubnetManager: error retrieving pod spec for 'kube-system/kube-flannel-ds-wlr92': the server does not allow access to the requested resource (get pods kube-flannel-ds-wlr92)
Please take a look at
thank you !

@Sliim
Copy link

Sliim commented Apr 4, 2017

This look like a rbac permission error. See kubernetes/kubeadm#212 (comment)

@xilu0
Copy link
Author

xilu0 commented Apr 4, 2017

@Sliim you are right, it`s rbac permission error,
I will
kubectl create -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel-rbac.yml
thank you!

@vagharsh
Copy link

vagharsh commented Apr 30, 2017

i have a CentOS 7 freshly installed i have updated the YUM repo and installed docker and k8s from the official guide i do a after creating these 3 pods
kubectl create -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel-rbac.yml
kubectl create -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/kubernetes-dashboard.yaml
everything start's up and runs, but after i do a system reboot kube-flannel does not start with this error CrashLoopBackOff

where can i find more details on why its not starting ?

@SemenMartynov
Copy link

Hi @vagharsh

Try to re-enable and re-start docker -- in my case it helps!

$ systemctl enable docker && systemctl start docker
$ systemctl status kubelet

@vagharsh
Copy link

i added this to the docker start options and everything worked fine after it.
--exec-opt native.cgroupdriver=systemd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants