kubernetes dashboard CrashLoopBackOff

Posted October 27, 2020 2.4k views

Brand new to kubernetes, but managed to install kubernetes, ubuntu 20.04 LTS, but having issues with the dashboard. followed the procedure, using flannel as CNF.

The log states issues with connection to, but telnet seems to work? Any suggestion how to getting further ?

bwa@prod3:~$ kubectl get pods -o wide --all-namespaces
NAMESPACE              NAME                                         READY   STATUS             RESTARTS   AGE   IP             NODE    NOMINATED NODE   READINESS GATES
kube-system            coredns-66bff467f8-jgmpl                     0/1     Running            1          27h     prod3   <none>           <none>
kube-system            coredns-66bff467f8-ldr9d                     0/1     Running            1          27h     prod3   <none>           <none>
kube-system            etcd-prod3                                   1/1     Running            1          27h   prod3   <none>           <none>
kube-system            kube-apiserver-prod3                         1/1     Running            1          27h   prod3   <none>           <none>
kube-system            kube-controller-manager-prod3                1/1     Running            1          27h   prod3   <none>           <none>
kube-system            kube-flannel-ds-amd64-xm26h                  1/1     Running            2          27h   prod3   <none>           <none>
kube-system            kube-proxy-7lk5d                             1/1     Running            1          27h   prod3   <none>           <none>
kube-system            kube-scheduler-prod3                         1/1     Running            1          27h   prod3   <none>           <none>
kubernetes-dashboard   dashboard-metrics-scraper-6b4884c9d5-xrdbh   1/1     Running            1          27h     prod3   <none>           <none>
kubernetes-dashboard   kubernetes-dashboard-7f99b75bf4-lfqtf        0/1     CrashLoopBackOff   310        27h     prod3   <none>           <none>

bwa@prod3:~$ kubectl logs kubernetes-dashboard-7f99b75bf4-lfqtf --namespace=kubernetes-dashboard --tail=100
    2020/08/05 12:02:31 Starting overwatch
    2020/08/05 12:02:31 Using namespace: kubernetes-dashboard
    2020/08/05 12:02:31 Using in-cluster config to connect to apiserver
    2020/08/05 12:02:31 Using secret token for csrf signing
    2020/08/05 12:02:31 Initializing csrf token from kubernetes-dashboard-csrf secret
    panic: Get "": dial tcp i/o timeout

    goroutine 1 [running]:*csrfTokenManager).init(0xc00000c640)
            /home/runner/work/dashboard/dashboard/src/app/backend/client/csrf/manager.go:41 +0x446
            /home/runner/work/dashboard/dashboard/src/app/backend/client/manager.go:501 +0xc6*clientManager).init(0xc00044f800)
            /home/runner/work/dashboard/dashboard/src/app/backend/client/manager.go:469 +0x47
            /home/runner/work/dashboard/dashboard/src/app/backend/dashboard.go:105 +0x20d
    bwa@prod3:~$ telnet 443
    Connected to
    Escape character is '^]'.
    ^CConnection closed by foreign host.

Know someone who can answer?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hello @nethrasmiley

From the logs provided by you, it looks like the issue is related to the secret. First, delete the secret corresponding to the kube-system namespace using the following command:

kubectl delete secret secretName -n kube-system

The api-server will then create a new secret. Now delete the dashboard pod, and the new pod spun up by the replicaset/deployment will use the new secret and the errors should be gone.

I hope it helps you!

Best Regards,
Purnima Kumari