Linkerd top in browser not working

Hi,

I am running linkerd in a Digital Ocean Kubernetes cluster. I can run, for example:

linkerd top namespace/linkerd

in the terminal and it works just fine. Running it via the web interface gives me an error:

 Error during WebSocket handshake: Unexpected response code: 403

and the server logs say:

time="2020-12-27T02:07:58Z" level=error msg="websocket: request origin not allowed by Upgrader.CheckOrigin"

which, I guess, is straight forward enough, but I am not sure how to fix this. I am running linkerd dashboard behind ambassador, the mapping is:

apiVersion: getambassador.io/v2
kind: Mapping
metadata:
  name: linkerd
spec:
  prefix: /
  host: linkerd.wetsnow.com
  add_linkerd_headers: true
  resolver: endpoint
  host_rewrite: linkerd-web.linkerd.svc.cluster.local:8084
  service: linkerd-web.linkerd.svc.cluster.local:8084
  allow_upgrade:
  - websocket

Is the problem due to the host_rewrite? I access linkerd externally as “linkerd.mydomain.com”. Is there a way to configure this so it works properly?

Thank you
Dan

Hi @MrWetsnow, the ambassador configuration looks correct. Would you mind checking the web component logs when this request fails?

kubectl logs -n linkerd linkerd-web

Is any other functionality of the dashboard not working?

Sorry for the delay:

2021/01/15 22:46:52 http: superfluous response.WriteHeader call from go.opencensus.io/plugin/ochttp.(*trackingResponseWriter).WriteHeader (server.go:221)
time="2021-01-15T22:47:07Z" level=error msg="websocket: request origin not allowed by Upgrader.CheckOrigin"