luxas / kubeadm-workshop

Showcasing a bare-metal multi-platform kubeadm setup with persistent storage and monitoring
MIT License
679 stars 190 forks source link

kubernetes-dashboard CrashLoopBackOff #21

Closed jamesbuckett closed 6 years ago

jamesbuckett commented 7 years ago

Hello.

Deploy Kubernetes Dashboard with : kubectl apply -f demos/dashboard/dashboard.yaml

Dashboard goes into CrashLoopBackOff state :

kube-system Pods
NAME                                   READY     STATUS             RESTARTS   AGE       IP              NODE
etcd-k8s-master                        1/1       Running            0          38m       192.168.0.160   k8s-master
heapster-3303827012-zd6c0              1/1       Running            0          16m       <none>          k8s-node-2
kube-apiserver-k8s-master              1/1       Running            4          42m       192.168.0.160   k8s-master
kube-controller-manager-k8s-master     1/1       Running            1          39m       192.168.0.160   k8s-master
kube-dns-2459497834-89f2f              3/3       Running            0          39m       10.32.0.2       k8s-master
kube-proxy-5mnzw                       1/1       Running            0          31m       192.168.0.163   k8s-node-3
kube-proxy-b0vqh                       1/1       Running            0          31m       192.168.0.164   k8s-node-4
kube-proxy-krgqg                       1/1       Running            0          39m       192.168.0.160   k8s-master
kube-proxy-s5h76                       1/1       Running            0          31m       192.168.0.161   k8s-node-1
kube-proxy-z9fcn                       1/1       Running            0          31m       192.168.0.162   k8s-node-2
kube-scheduler-k8s-master              1/1       Running            0          40m       192.168.0.160   k8s-master
kubernetes-dashboard-184298627-vl956   0/1       CrashLoopBackOff   6          17m       <none>          k8s-node-3
weave-net-7xxp6                        2/2       Running            0          31m       192.168.0.162   k8s-node-2
weave-net-cxzn2                        2/2       Running            0          31m       192.168.0.164   k8s-node-4
weave-net-l0bw5                        2/2       Running            0          31m       192.168.0.161   k8s-node-1
weave-net-r1bzn                        2/2       Running            0          35m       192.168.0.160   k8s-master
weave-net-wz9v4                        2/2       Running            1          31m       192.168.0.163   k8s-node-3

kube-system Services
NAME                   CLUSTER-IP      EXTERNAL-IP   PORT(S)         AGE
heapster               10.96.242.72    <none>        80/TCP          16m
kube-dns               10.96.0.10      <none>        53/UDP,53/TCP   39m
kubernetes-dashboard   10.97.240.210   <none>        80/TCP          17m

Nodes
NAME         STATUS    AGE       VERSION   EXTERNAL-IP   OS-IMAGE                        KERNEL-VERSION
k8s-master   Ready     42m       v1.7.2    <none>        Raspbian GNU/Linux 8 (jessie)   4.4.50-hypriotos-v7+
k8s-node-1   Ready     31m       v1.7.2    <none>        Raspbian GNU/Linux 8 (jessie)   4.4.50-hypriotos-v7+
k8s-node-2   Ready     31m       v1.7.2    <none>        Raspbian GNU/Linux 8 (jessie)   4.4.50-hypriotos-v7+
k8s-node-3   Ready     31m       v1.7.2    <none>        Raspbian GNU/Linux 8 (jessie)   4.4.50-hypriotos-v7+
k8s-node-4   Ready     31m       v1.7.2    <none>        Raspbian GNU/Linux 8 (jessie)   4.4.50-hypriotos-v7+

kubectl describe po kubernetes-dashboard-184298627-vl956 -n kube-system gives :

  FirstSeen     LastSeen        Count   From                    SubObjectPath                           Type            Reason  Message
  ---------     --------        -----   ----                    -------------                           --------        ------  -------
  17m           17m             1       default-scheduler                                               Normal          ScheduledSuccessfully assigned kubernetes-dashboard-184298627-vl956 to k8s-node-3
  17m           17m             1       kubelet, k8s-node-3                                             Normal          SuccessfulMountVolume    MountVolume.SetUp succeeded for volume "dashboard-token-wchfv"
  13m           16s             8       kubelet, k8s-node-3     spec.containers{kubernetes-dashboard}   Normal          Pulling pulling image "luxas/kubernetes-dashboard:v1.6.1"
  12m           10s             8       kubelet, k8s-node-3     spec.containers{kubernetes-dashboard}   Normal          Pulled  Successfully pulled image "luxas/kubernetes-dashboard:v1.6.1"
  12m           10s             8       kubelet, k8s-node-3     spec.containers{kubernetes-dashboard}   Normal          Created Created container
  11m           9s              8       kubelet, k8s-node-3     spec.containers{kubernetes-dashboard}   Normal          Started Started container
  13m           6s              53      kubelet, k8s-node-3                                             Warning         FailedSync               Error syncing pod
  11m           6s              52      kubelet, k8s-node-3     spec.containers{kubernetes-dashboard}   Warning         BackOff Back-off restarting failed container

On the node docker logs bcc9c66addcd gives :

Using HTTP port: 8443
Creating API server client for https://10.96.0.1:443
Error while initializing connection to Kubernetes apiserver. This most likely means that the cluster is misconfigured (e.g., it has invalid apiserver certificates or service accounts configuration) or the --apiserver-host param points to a server that does not exist. Reason: Get https://10.96.0.1:443/version: dial tcp 10.96.0.1:443: connect: network is unreachable
Refer to the troubleshooting guide for more information: https://github.com/kubernetes/dashboard/blob/master/docs/user-guide/troubleshooting.md

Appreciate any help to resolve this.