Skip to main content

API Gateway Dashboard

The dashboard is the central place that shows you the current active routes.


The dashboard is the central place that shows you the current active routes handled by Traefik Hub.

https://dev.example.com/dashboard/

Dashboard Overview.

The dashboard is available at the same location as the API but on the path /dashboard/ by default.

warning

The trailing slash / in /dashboard/ is mandatory.

There are 2 ways to configure and access the dashboard:

note

There is also a redirect of the path / to the path /dashboard/, but one should not rely on that property as it is bound to change, and it might make for confusing routing rules anyway.

Secure Mode

This is the recommended method.

FieldDescriptionDefaultRequired
dashboardEnable the dashboard.FalseNo

First, save the default configuration.
The following command will save it to a file with the name values.yaml in your working directory.

CLI
helm show values traefik/traefik-hub > values.yaml

Second, adjust the file.

values.yaml
ingressRoute:
dashboard:
enabled: true

Install the Traefik Hub API Gateway with Your Custom Settings

Once you have the configuration adjusted to your needs, use Helm to deploy the Traefik Hub API Gateway with the new values:

CLI
helm upgrade --install --namespace traefik-hub traefik-hub traefik/traefik-hub --values values.yaml

Then define a routing configuration on Traefik Hub itself, with a router attached to the service api@internal to allow defining:

Dashboard Router Rule

As underlined in the documentation for the api.dashboard option, the router rule defined for Traefik Hub must match the path prefixes /api and /dashboard.

We recommend using a Host Based rule to match everything on the host domain, or to make sure that the defined rule captures both prefixes:

# The dashboard can be accessed on http://dev.example.com/dashboard/
rule = "Host(`dev.example.com`)"

Dashboard Configuration

Example of an deployment file:

Kubernetes
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: traefik-dashboard
spec:
routes:
- match: Host(`dev.example.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))
kind: Rule
services:
- name: api@internal
kind: TraefikService
middlewares:
- name: auth-oidc
---
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: auth-oidc
spec:
plugin:
oidc:
issuer: "https://tenant.auth0.com/realms/myrealm"
redirectUrl: "/callback"
clientID: my-oidc-client-name
clientSecret: mysecret

Insecure Mode

warning

This mode is not recommended because it does not allow the use of security features.

To enable the "insecure mode", adjust the default configuration.
The following command will save it to a file with the name values.yaml in your working directory.

Second, adjust the file.

values.yaml
additionalArguments:
- --api.insecure=true

Install the Traefik Hub API Gateway with Your Custom Settings

Once you have the configuration adjusted to your needs, use Helm to deploy the Traefik Hub API Gateway with the new values:

CLI
helm upgrade --install --namespace traefik-hub traefik-hub traefik/traefik-hub --values values.yaml

You can now access the dashboard on the port 8080 of the Traefik Hub API Gateway instance, at the following URL: http://<Traefik Hub Cluster IP>:8080/dashboard/ (the trailing slash is mandatory).