dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

How to access the Dapr Dashboard when its running in Kubernetes?

Open xendren opened this issue 4 years ago • 5 comments

I'm really not understanding how to access the dashboard when it is running in Kubernetes. The instructions just say I need the Dapr CLI and can launch it as follows: dapr dashboard -k

I have the Dapr CLI on my laptop, and when I run that command it appears to somehow magically detect that the dashboard is running in the "Dapr-system" namespace at "http://localhost:8080", but it fails to connect. Looking at the dashboard setup in the Kubernetes cluster, it appears to be configured from the helmchart at "http://localhost:8080". I'm not understanding how that would possibly work within the cluster.

I'm hoping this may be the reason none of our sidecar containers ever startup. There was an issue reported that the sidecars wouldn't startup because they could not talk to the dashboard.

xendren avatar Feb 07 '22 02:02 xendren

Bump - having the same issue.

HemSoft avatar Jul 24 '23 06:07 HemSoft

Same issue here. It seems dapr init -k doesn't install it in kubernetes mode anymore. I used a proxy to access it, but now I don't see the dapr-dashboard service for it anymore. Did that change in the last year or so?

JasonRodman avatar Aug 04 '23 14:08 JasonRodman

Yes, the dashboard is now installed separately from Dapr - https://github.com/dapr/dashboard#installation.

Once the dashboard is installed, you can connect to it locally via kubectl port-forward svc/dapr-dashboard 8080:8080 then go to http://localhost:8080.

yaron2 avatar Aug 04 '23 16:08 yaron2

I would recommend noting that somewhere in the documentation. I could not find any mention of it. I only found out thru trial and error. I did see changes to the dapr init command to specify the dashboard version, has that been removed and just the docs are out of date?

JasonRodman avatar Aug 04 '23 18:08 JasonRodman

I checked with the latest version of dapr, created a k3d cluster and deployed dapr with the command dapr init -k and with command dapr init -k --enable-ha=true , ran the command dapr dashboard -k -p 9999 and the tunnel was correctly created, opened the url http://localhost:9999/overview in the browser and everything worked correctly

dashboard service is present image dashboard pod is running image

A small correction, in the kubectl port-forward command:

Once the dashboard is installed, you can connect to it locally via kubectl port-forward svc/dapr-dashboard 8080:8080 then go to http://localhost:8080.

When dapr is install with default configuration the dashboard pod runs in the dapr-system namespace, the correct command to port-foward the dashboard service is: kubectl port-forward -n dapr-system svc/dapr-dashboard 8080:8080

I'm really not understanding how to access the dashboard when it is running in Kubernetes. The instructions just say I need the > Dapr CLI and can launch it as follows: dapr dashboard -k

the dapr cli and kubectl cli must be installed in the pc and the k8s cluster must be reachable with kubectl (try running kubectl cluster-info to check connectivity), the dapr dashboard -k assumes that the dashboard installation is done in the dapr-system ,the default installation namespace.

dapr version tested: 1.13.0 dashboard version tested: 0.14.0

Does the problem persist? Can you send the text of the dashboard connection error and the output of the commandkubectl get pod -n dapr-system

m3nax avatar Apr 17 '24 13:04 m3nax