kube-dns and weave-net not starting

2019-07-04 00:06发布

I am deploying Kubernetes 1.4 on Ubuntu 16 on Raspberry Pi 3 following the instructions at http://kubernetes.io/docs/getting-started-guides/kubeadm/. The master starts and the minion joins no problem but when I add weave kubedns won't start. Here's the pods:

k8s@k8s-master:~$ kubectl get pods --all-namespaces
NAMESPACE     NAME                                 READY     STATUS              RESTARTS   AGE
kube-system   etcd-k8s-master                      1/1       Running             1          23h
kube-system   kube-apiserver-k8s-master            1/1       Running             3          23h
kube-system   kube-controller-manager-k8s-master   1/1       Running             1          23h
kube-system   kube-discovery-1943570393-ci2m9      1/1       Running             1          23h
kube-system   kube-dns-4291873140-ia4y8            0/3       ContainerCreating   0          23h
kube-system   kube-proxy-arm-nfvvy                 1/1       Running             0          1h
kube-system   kube-proxy-arm-tcnta                 1/1       Running             1          23h
kube-system   kube-scheduler-k8s-master            1/1       Running             1          23h
kube-system   weave-net-4gqd1                      0/2       CrashLoopBackOff    54         1h
kube-system   weave-net-l758i                      0/2       CrashLoopBackOff    44         1h

The events log doesn't show anything. getting logs for kube-dns doesn't get anything either.

What can I do to debug?

2条回答
劳资没心,怎么记你
2楼-- · 2019-07-04 00:39

kube-dns won't start until the network is up.

Look in the kubelet logs on each machine for more information about the crash that is causing the CrashLoopBackoff.

How did you get ARM images for Weave Net? The weaveworks/weave-kube image on DockerHub is only built for x64.

Edit: as @pidster says Weave Net now supports ARM

查看更多
祖国的老花朵
3楼-- · 2019-07-04 01:04

UPDATE: As Bryan pointed out, Flannel is not the only overlay network anymore.

Note this two hints in the kubeadm install documentation:

Flannel is the only network overlay support for arm

If you are on another architecture than amd64, you should use the flannel overlay network as described in the multi-platform section

When using Flannel, you need to make a kubectl init --por-network-cidr=10.244.0.0/16

Note: this will autodetect the network interface to advertise the master on as the interface with the default gateway. If you want to use a different interface, specify --api-advertise-addresses= argument to kubeadm init. If you want to use flannel as the pod network, specify --pod-network-cidr=10.244.0.0/16 if you’re using the daemonset manifest below. However, please note that this is not required for any other networks besides Flannel.

You may also would like to check my automated step-by-step installation for Raspberry Pi 3 with Ansible, since there is no issue with DNS and probably will work with Ubuntu 16 as well:

NAMESPACE     NAME                                           READY     STATUS    RESTARTS   AGE
default       busybox-894550917-7vj3z                        1/1       Running   0          15h
default       busybox-894550917-p9vnl                        1/1       Running   1          3d
default       gogs-3464422143-cf5wb                          1/1       Running   0          16h
kube-system   dummy-2501624643-pxmgz                         1/1       Running   2          3d
kube-system   etcd-master.cluster.local                      1/1       Running   2          3d
kube-system   kube-apiserver-master.cluster.local            1/1       Running   2          3d
kube-system   kube-controller-manager-master.cluster.local   1/1       Running   2          3d
kube-system   kube-discovery-1659614412-vrhv4                1/1       Running   2          3d
kube-system   kube-dns-4211557627-kpsj4                      4/4       Running   8          3d
kube-system   kube-flannel-ds-d1bgg                          2/2       Running   6          3d
kube-system   kube-flannel-ds-fcp4b                          2/2       Running   6          3d
kube-system   kube-flannel-ds-n7p3m                          2/2       Running   6          3d
kube-system   kube-flannel-ds-tn7nd                          2/2       Running   6          3d
kube-system   kube-flannel-ds-vpk4w                          2/2       Running   6          3d
kube-system   kube-proxy-5nmtn                               1/1       Running   2          3d
kube-system   kube-proxy-gq7bz                               1/1       Running   2          3d
kube-system   kube-proxy-lkkgm                               1/1       Running   2          3d
kube-system   kube-proxy-mlh3v                               1/1       Running   1          3d
kube-system   kube-proxy-sg8n8                               1/1       Running   2          3d
kube-system   kube-scheduler-master.cluster.local            1/1       Running   2          3d
kube-system   kubernetes-dashboard-3507263287-h9q33          1/1       Running   2          3d
查看更多
登录 后发表回答