Kubernetes dashboard status-CrashLoopBackOff

0 votes

I’m trying to implement Kubernetes dashboard and its status is always CrashLoopBackOff

host-xxx:~ # kubectl get pods --all-namespaces                                                                                                                                                                           
NAMESPACE     NAME                                    READY     STATUS             RESTARTS   AGE
default       locust-master-pr59t                     1/1       Running            0          2d
default       my-nginx-2565190728-8z0eh               1/1       Running            0          2d
default       my-nginx-2565190728-if4my               1/1       Running            0          2d
kube-system   kubernetes-dashboard-1975554030-80rxv   0/1       CrashLoopBackOff   249 

This is my yaml file:

host-xxx:~ # kubectl describe pod --namespace=kube-system kubernetes-dashboard-1975554030-80rxv
Name:           kubernetes-dashboard-1975554030-80rxv
Namespace:      kube-system
Node:           host-44-11-1-25/44.11.1.25
Start Time:     Wed, 21 Dec 2016 14:49:48 +0000
Labels:         app=kubernetes-dashboard
                pod-template-hash=1975554030
Status:         Running
IP:             172.20.140.2
Controllers:    ReplicaSet/kubernetes-dashboard-1975554030
Containers:
  kubernetes-dashboard:
    Container ID:               docker://708aac5cebdff057b69cec94e582cb45f7dba424c336fb320dd0d5e3243fc323
    Image:                      gcr.io/google_containers/kubernetes-dashboard-amd64:v1.5.0
    Image ID:                   docker://sha256:e5133bac8024ac6c916f16df8790259b5504a800766bee87dcf90ec7d634a418
    Port:                       9090/TCP
    State:                      Waiting
      Reason:                   CrashLoopBackOff
    Last State:                 Terminated
      Reason:                   Error
      Exit Code:                1
      Started:                  Thu, 22 Dec 2016 11:32:12 +0000
      Finished:                 Thu, 22 Dec 2016 11:32:13 +0000
    Ready:                      False
    Restart Count:              244
    Liveness:                   http-get http://:9090/ delay=30s timeout=30s period=10s #success=1 #failure=3
    Environment Variables:      <none>
Conditions:
  Type          Status
  Initialized   True
  Ready         False
  PodScheduled  True
No volumes.
QoS Tier:       BestEffort
Events:
  FirstSeen     LastSeen        Count   From                            SubobjectPath                           Type            Reason                  Message
  ---------     --------        -----   ----                            -------------                           --------        ------                  -------
  20h           3m              245     {kubelet host-44-11-1-25}       spec.containers{kubernetes-dashboard}   Normal          Pulling                 pulling image "gcr.io/google_containers/kubernetes-dashboard-amd64:v1.5.0"
  20h           3m              246     {kubelet host-44-11-1-25}                                               Warning         MissingClusterDNS       kubelet does not have ClusterDNS IP configured and cannot create Pod using "ClusterFirst" policy. Falling back to DNSDefault policy.
  20h           3m              245     {kubelet host-44-11-1-25}       spec.containers{kubernetes-dashboard}   Normal          Pulled                  Successfully pulled image "gcr.io/google_containers/kubernetes-dashboard-amd64:v1.5.0"
  20h           3m              236     {kubelet host-44-11-1-25}       spec.containers{kubernetes-dashboard}   Normal          Created                 (events with common reason combined)
  20h           3m              236     {kubelet host-44-11-1-25}       spec.containers{kubernetes-dashboard}   Normal          Started                 (events with common reason combined)
  20h           3s              5940    {kubelet host-44-11-1-25}       spec.containers{kubernetes-dashboard}   Warning         BackOff                 Back-off restarting failed docker container
  20h           3s              5906    {kubelet host-44-11-1-25}   

Whats the issue?

Aug 27, 2018 in Kubernetes by lina
• 8,220 points

edited Aug 27, 2018 by Kalgi 9,097 views

3 answers to this question.

0 votes

You could use command
kubectl logs --namespace=kube-system kubernetes-dashboard-1975554030-80rxv
to check error details about what happened.
You might get this error or warning saying
 kubelet does not have ClusterDNS IP configured and cannot create Pod using "ClusterFirst" policy. Falling back to DNSDefault policy.
Maybe you did not enable kubedns component yet, which may cause this problem.

to create your kubernetes dashboard, you could run command
kubectl edit pod kubernetes-dashboard-1975554030-80rxv -n kube-system
to manually change DNS policy to default. The key should be spec.template.spec.dnsPolicy to Default then recreate this Pod to see if it will work.

Level up your Kubernetes expertise with our industry-leading Kubernetes Course.

answered Aug 27, 2018 by Kalgi
• 52,350 points
0 votes

I had the same issue, I solved it by manually pointing to apiserver using the 'args' attribute in kubernetes-dashboard.yaml

args:
# Uncomment the following line to manually specify Kubernetes API server Host
# If not specified, Dashboard will attempt to auto discover the API server and connect
# to it. Uncomment only if the default does not work.
# - --apiserver-host=http://my-address:port
answered Apr 24, 2019 by Khushi
0 votes

I had the same issue, struggled for days. This is what worked for me.

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 rc/deployment will use the new secret and the errors corresponding to "credentials" should be gone.

answered Apr 24, 2019 by Bebo

Related Questions In Kubernetes

+1 vote
1 answer

Unable to access kubernetes dashboard

You’re trying to access a private IP. ...READ MORE

answered Aug 27, 2018 in Kubernetes by Kalgi
• 52,350 points
2,981 views
+1 vote
2 answers

Accessing Kubernetes Web UI (Dashboard)

To access Kubernetes dashboard, you need to ...READ MORE

answered Apr 16, 2019 in Kubernetes by Ray
2,370 views
0 votes
1 answer

Pod status not ready always - kubernetes

I was having the same issue. In the ...READ MORE

answered Sep 6, 2018 in Kubernetes by Kalgi
• 52,350 points
3,676 views
0 votes
1 answer

How do I sign-in to kubernetes dashboard?

Since version 1.7 Dashboard uses more secure ...READ MORE

answered Sep 7, 2018 in Kubernetes by DareDev
• 6,890 points
2,312 views
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
15,527 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,047 views
0 votes
1 answer

Kubernetes Dashboard v1.8.3 deployment

You’ve created your ServiceAccount on a different ...READ MORE

answered Aug 27, 2018 in Kubernetes by Kalgi
• 52,350 points
992 views
0 votes
1 answer

Error while creating kubernetes dashboard

The installation fails because there is no ...READ MORE

answered Aug 27, 2018 in Kubernetes by Kalgi
• 52,350 points
1,886 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP