View linkerd dashboard at non-root URL
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 11.5k
- Forks
- 1.4k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 53
Description
## Bug Report
### What is the issue?
TLDR: Linkerd dashboard dependencies aren't using relative URL paths.
I would like to be able to have the linkerd dashboard running behind a reverse proxy at a URL like example.com/linkerd/. When I put linkerd behind a reverse proxy, the main page loads but can't find get the javascript dependencies retrieved via an absolute path.

### How can it be reproduced?
Add a k8s ingress that routes a non-root path to the dashboard. In this case, I'm using Traefik but Nginx, HA proxy, etc. would work.
Example ingress configuration:
```
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: linkerd-dashboard-ingress
namespace: linkerd
annotations:
kubernetes.io/ingress.class: "traefik"
traefik.frontend.rule.type: PathPrefixStrip
spec:
rules:
- http:
paths:
- path: /linkerd
backend:
serviceName: linkerd-web
servicePort: 8084
```
### Logs, error output, etc
See image above.
#### `linkerd check` output
```text
$ linkerd check
kubernetes-api
--------------
√ can initialize the client
√ can query the Kubernetes API
kubernetes-version
------------------
√ is running the minimum Kubernetes API version
√ is running the minimum kubectl version
linkerd-config
--------------
√ control plane Namespace exists
√ control plane ClusterRoles exist
√ control plane ClusterRoleBindings exist
√ control plane ServiceAccounts exist
√ control plane CustomResourceDefinitions exist
√ control plane MutatingWebhookConfigurations exist
√ control plane ValidatingWebhookConfigurations exist
√ control plane PodSecurityPolicies exist
linkerd-existence
-----------------
√ 'linkerd-config' config map exists
√ heartbeat ServiceAccount exist
√ control plane replica sets are ready
√ no unschedulable pods
√ controller pod is running
√ can initialize the client
√ can query the control plane API
linkerd-api
-----------
√ control plane pods are ready
√ control plane self-check
√ [kubernetes] control plane can talk to Kubernetes
√ [prometheus] control plane can talk to Prometheus
√ no invalid service profiles
linkerd-version
---------------
√ can determine the latest version
√ cli is up-to-date
control-plane-version
---------------------
√ control plane is up-to-date
√ control plane and cli versions match
Status check results are √
```
### Environment
- Kubernetes Version: 1.15.3
- Cluster Environment: Bare metal
- Host OS: Ubuntu 16.04
- Linkerd version: stable-2.6.0
### Possible solution
Change dependencies to use relative URL.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Linkerd dashboard code that generates dependency URLs, then reproduce the issue with the provided Kubernetes Ingress configuration under /linkerd. Done means the dashboard loads its JavaScript dependencies and functions correctly when served at a non-root URL behind a reverse proxy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100