alexellis/k8s-on-raspbian

Flannel installation yaml file link is out of date

svernier opened this issue · 7 comments

The current flannel yaml linked to by the guide (https://raw.githubusercontent.com/coreos/flannel/c5d10c8/Documentation/kube-flannel.yml) no longer starts the flannel pods due to updates since 1.10. Tolerations were added to the yaml in flannel-io/flannel#1044.

Expected Behaviour

Flannel pods should automatically start with the kubectl apply command

Current Behaviour

Flannel daemonsets are created but no pods are started

Possible Solution

Steps to Reproduce (for bugs)

  1. Follow instructions to the install for a version >= 1.12.
  2. For the networking step, take the flannel option
  3. Check for flannel pods after kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml

Context

Nodes were stuck in NotReady state until I used the updated link.

Your Environment

  • Docker version docker version (e.g. Docker 17.0.05 ):

  • What version of Kubernetes are you using? kubectl version: Server - 1.13.3 Client - 1.13.2

  • Operating System and version (e.g. Linux, Windows, MacOS): Linux

I tried the new link and it crashes my Raspberry (Master).
After I apply it:

kube-flannel-ds-arm-r7kwl 0/1 PodInitializing 0 7s

and then it crashes, am I doing something wrong?
I've just started playing with Kubernetes in Raspberry Pi's.

What comes back when you run kubectl describe pod kube-flannel-ds-arm-r7kwl?

I think that flannel installed successfully because

pi@k8s-master:~ $ kubectl get pods --namespace=kube-system
NAME                                         READY   STATUS              RESTARTS   AGE
coredns-86c58d9df4-5rpnj                     0/1     ContainerCreating   0          66m
coredns-86c58d9df4-dv6c9                     0/1     ContainerCreating   0          66m
etcd-k8s-master                              1/1     Running             1          65m
kube-apiserver-k8s-master                    1/1     Running             1          66m
kube-controller-manager-k8s-master           1/1     Running             1          65m
kube-flannel-ds-arm-9bzfr                    1/1     Running             0          19s
kube-flannel-ds-arm-j9k2s                    1/1     Running             0          19s
kube-proxy-rpf84                             1/1     Running             0          48m
kube-proxy-vv67p                             1/1     Running             1          66m
kube-scheduler-k8s-master                    1/1     Running             1          66m

and

pi@k8s-master:~ $ kubectl get nodes
NAME         STATUS   ROLES    AGE   VERSION
k8s-master   Ready    master   79m   v1.13.3
k8s-node-1   Ready    <none>   61m   v1.13.3

But then it crashed (ssh terminated and not responding if I try to ssh again) so I had to cut it's power in order to force-reboot it.
After it booted, it was working as expected (pods Running) but it crashed again after a minute or so while I was typing:
kubectl get pods --namespace=kube-system

Any idea why is this happening?

What comes back when you run kubectl describe pod kube-flannel-ds-arm-r7kwl?

pi@k8s-master:~ $ kubectl get pods --namespace=kube-system
NAME                                         READY   STATUS             RESTARTS   AGE
coredns-86c58d9df4-5rpnj                     1/1     Running            0          92m
coredns-86c58d9df4-dv6c9                     0/1     Error              12         92m
etcd-k8s-master                              1/1     Running            3          91m
kube-apiserver-k8s-master                    1/1     Running            3          92m
kube-controller-manager-k8s-master           1/1     Running            3          91m

> kube-flannel-ds-arm-9bzfr                    1/1     Running            0          26m
> kube-flannel-ds-arm-j9k2s                    0/1     Error              3          26m

kube-proxy-rpf84                             1/1     Running            0          75m
kube-proxy-vv67p                             1/1     Running            3          92m
kube-scheduler-k8s-master                    1/1     Running            3          92m
kubernetes-dashboard-head-7bc4868777-4qnj9   0/1     CrashLoopBackOff   1          88m

Crashed again.

I'm currently using Weave net with success. I'd recommend switching over and logging and issue with the flannel folks and checking their issue tracker of course.

Also double check that each Pi has s unique machine ID.

Alex

@alexellis I've tried Weave Net before I switched to Flannel and it kept crashing too.
I think the problem is that CoreDNS is in CrashLoopBackOff and Error state and after a while it crashes the Pi.

coredns-86c58d9df4-dv6c9                     0/1     Error              21         112m

I sometimes get this too:

pi@k8s-master:~ $ kubectl get pods --namespace=kube-system
Unable to connect to the server: net/http: TLS handshake timeout

Sigh, one week Flannel works and the next Weave net, then they both push code and one breaks and the other gets fixed. I hope this will improve over time.

Thanks for the PR you raised, I'll now close this issue.

Alex