Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to start traefik dashboard? #85

Closed
MichelDiz opened this issue Feb 20, 2020 · 18 comments
Closed

How to start traefik dashboard? #85

MichelDiz opened this issue Feb 20, 2020 · 18 comments
Labels
kind/question Further information is requested

Comments

@MichelDiz
Copy link

In general, I would do:

helm install traefik traefik/traefik --set dashboard.ingressRoute="true"

By digging I tried

helm install traefik traefik/traefik --set="{--dashboard.ingressRoute=true}"

But it won't work at all.

What are the guides here?

@arlyon
Copy link
Contributor

arlyon commented Feb 21, 2020

Also struggling with this. Can access traefik (as evidenced by the 404 page) but dashboard is also a 404...

edit: the trailing / is mandatory so ${ip}/dashboard/

@ldez ldez added the kind/question Further information is requested label Feb 21, 2020
@MichelDiz
Copy link
Author

The "workaround" I did was clone the repo, edit manually and helm install traefik ./

@ldez
Copy link
Member

ldez commented Feb 21, 2020

Hello,

You have to set: dashboard.enable=true and dashboard.ingressRoute=true

https://github.com/containous/traefik-helm-chart/blob/43d63f418836d7aaac03cfca5b54f4287c8acf9c/traefik/values.yaml#L76-L83

FYI this helm chart is now published in this repo: https://github.com/containous/traefik-helm-chart#installing

@MichelDiz
Copy link
Author

Hi @ldez , the issue is that I have to clone instead of following the instructions in the readme. To make it work.

@MichelDiz
Copy link
Author

You guys could add a new value in https://github.com/containous/traefik-helm-chart/blob/d7fc8d82551dd8c22a842948f32f4dc9233492e7/traefik/templates/dashboard-hook-ingressroute.yaml#L1
with "OR" operator we could do something like

helm install traefik traefik/traefik --set expose.dashboard=true

Just supposing about it, need to test out the hypothesis.

@mmatur
Copy link
Member

mmatur commented Mar 12, 2020

Hi @MichelDiz,

The dashboard is now deployed by default only on traefik entry-point.

You can do the installation with the following command:

helm install traefik traefik/traefik

The dashboard is accessible with the following command:

kubectl port-forward traefik-xxxx-xxx 9000:9000

https://localhost:9000/

I'm closing this issue because I think the question is answered.

@blasrodri
Copy link

blasrodri commented Apr 16, 2020

@mmatur
I've installed it using

helm traefik treafik/treafik

Then I do:

$ kubectl port-forward traefik-6c4575d8b8-5w2z5 9000:9000
$ curl http://localhost:9000/ping
OK
$ curl http://localhost:9000/
404 page not found

Any idea of what I'm missing?

@mmatur
Copy link
Member

mmatur commented Apr 16, 2020

@blasrodri

The dashboard is exposed on /dashboard

curl http://localhost:9000/dashboard/

@blasrodri
Copy link

blasrodri commented Apr 16, 2020

Thanks @mmatur . But still having trouble.
Forgot to add:

curl http://localhost:9000/dashboard
404 page not found

@blasrodri
Copy link

blasrodri commented Apr 16, 2020

oh, is the trailing /? haha
Got it, thanks!

@nelsonyaccuzzi
Copy link

Hi, I can't get to the dashboard

I've tried with the trailing dash and it doesn't work, but the ping endpoint works

➜ ~ kubectl port-forward $(kubectl get pods --selector "app.kubernetes.io/name=traefik" --output=name -n traefik-v2) 9000:9000 -n traefik-v2
Forwarding from 127.0.0.1:9000 -> 9000
Forwarding from [::1]:9000 -> 9000
➜  ~ curl http://localhost:9000/ping
OK%                                                                                                                              
➜  ~ curl http://localhost:9000/dashboard
404 page not found
➜  ~ curl http://localhost:9000/dashboard/
404 page not found

@yusiwen
Copy link

yusiwen commented Oct 19, 2020

still got 404 when accessing http://localhost:9000/dashboard/
any updates?

@dchernivetsky
Copy link

dchernivetsky commented Dec 11, 2020

+1 for this. Why is this closed without due investigation.
We have a default chart installation with the following values.yaml:

traefik:
  enabled: true
  additionalArguments: 
    - "--providers.kubernetesingress"
    - "--providers.kubernetescrd.ingressclass=traefik-internal"
    - "--providers.kubernetesingress.ingressclass=traefik-internal"
    - "--metrics.prometheus=true"
    - "--metrics.prometheus.entrypoint=metrics"
    - "--entrypoints.metrics.address=0.0.0.0:9100"
  serviceType: LoadBalancer
  nameOverride: traefik-internal
  fullnameOverride: traefik-internal
  replicas: 1
  rbac:
    enabled: true
  resources:
    limits:
      cpu: 300m
      memory: 200Mi
    requests:
      cpu: 100m
      memory: 200Mi
  autoscaling:
    enabled: true
    minReplicas: 1
    maxReplicas: 20
    metrics:
    - type: Resource
      resource:
        name: cpu
        targetAverageUtilization: 60

It does seem to install the dashboard ingressroute

kubectl get ingressroute -n kube-system
NAME                         AGE
traefik-internal-dashboard   18m

However no dashboard shows up when port-forwarded:

$ curl http://localhost:9000/dashboard/
404 page not found
$ 

EDIT: For anyone else having trouble with this @nelsonyaccuzzi @yusiwen check that your ingressroute for the dashboard has the correct annotation for the ingress class, should look something like this

apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  annotations:
    helm.sh/hook: post-install,post-upgrade
    kubernetes.io/ingress.class: traefik-internal
  labels:
    app: traefik-internal
  [...]

Note the kubernetes.io/ingress.class annotation. To be honest this is a poorly designed parameter. If we are expecting users to override the ingress class via a flag to the binary then we can't expect the users to know the effects this flag might have on other resources (ingressRoute in this example).
ingress class should be moved to its own value parameter and modify any and all aspects of the chart that it influences.

TL;DR there's a bug in the chart with the way it handles ingress.class
@ldez @mmatur /reopen

@xrl
Copy link

xrl commented Feb 24, 2021

I cleared up this error on my side by tearing down the traefik helm release, reinstalling it. Something is screwed up with the CRDs, as the post directly above me indicates. But I wasn't doing anything to change the ingress classes so those changes didn't help me.

@indigo423
Copy link

indigo423 commented Jan 27, 2022

Ran into a similar issue deploying the Helm chart. What is really important, add the / in the URL when accessing it with port forwarding like here http://localhost:49599/dashboard/.

@NicolasTr
Copy link

I ran into a similar issue. I had to add the following to the helm values to be able to port forward to the dashboard:

ingressRoute:
  dashboard:
    enabled: true

@broomfn
Copy link

broomfn commented Dec 2, 2022

Why do we need the tailing "/" on "/dashboard/", It's really confusing, I thought one of the goals of Traefik was (and I quote)

"With Traefik, you spend time developing and deploying new features to your system, not on configuring and maintaining its working state."

I've spent hours trying to get this working, and things like having to add tailing backslashes really don't help :-(

@lzd-1230
Copy link

I ran into a similar issue. I had to add the following to the helm values to be able to port forward to the dashboard:

ingressRoute:
  dashboard:
    enabled: true

That's real methods dude... It's weird that after open ingressRoute but without actual ingressRoute resource in k8s when using kubectl get ingressroute --all-namespace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Further information is requested
Projects
None yet
Development

No branches or pull requests