Exposing the Dashboard

Instead of using linkerd dashboard every time you’d like to see what’s goingon, you can expose the dashboard via an ingress. This will also expose Grafana.

Nginx

A sample ingress definition is:

  1. apiVersion: v1
  2. kind: Secret
  3. type: Opaque
  4. metadata:
  5. name: web-ingress-auth
  6. namespace: linkerd
  7. data:
  8. auth: YWRtaW46JGFwcjEkbjdDdTZnSGwkRTQ3b2dmN0NPOE5SWWpFakJPa1dNLgoK
  9. ---
  10. apiVersion: extensions/v1beta1
  11. kind: Ingress
  12. metadata:
  13. name: web-ingress
  14. namespace: linkerd
  15. annotations:
  16. kubernetes.io/ingress.class: "nginx"
  17. nginx.ingress.kubernetes.io/configuration-snippet: |
  18. proxy_set_header l5d-dst-override $service_name.$namespace.svc.cluster.local:8084;
  19. proxy_set_header Origin "";
  20. proxy_hide_header l5d-remote-ip;
  21. proxy_hide_header l5d-server-id;
  22. nginx.ingress.kubernetes.io/auth-type: basic
  23. nginx.ingress.kubernetes.io/auth-secret: web-ingress-auth
  24. nginx.ingress.kubernetes.io/auth-realm: "Authentication Required"
  25. spec:
  26. rules:
  27. - host: dashboard.example.com
  28. http:
  29. paths:
  30. - backend:
  31. serviceName: linkerd-web
  32. servicePort: 8084

This exposes the dashboard at dashboard.example.com and protects it with basicauth using admin/admin. Take a look at the ingress-nginxdocumentation for details on how to change the username and password.

Traefik

A sample ingress definition is:

  1. apiVersion: v1
  2. kind: Secret
  3. type: Opaque
  4. metadata:
  5. name: web-ingress-auth
  6. namespace: linkerd
  7. data:
  8. auth: YWRtaW46JGFwcjEkbjdDdTZnSGwkRTQ3b2dmN0NPOE5SWWpFakJPa1dNLgoK
  9. ---
  10. apiVersion: extensions/v1beta1
  11. kind: Ingress
  12. metadata:
  13. name: web-ingress
  14. namespace: linkerd
  15. annotations:
  16. kubernetes.io/ingress.class: "traefik"
  17. ingress.kubernetes.io/custom-request-headers: l5d-dst-override:linkerd-web.linkerd.svc.cluster.local:8084
  18. traefik.ingress.kubernetes.io/auth-type: basic
  19. traefik.ingress.kubernetes.io/auth-secret: web-ingress-auth
  20. spec:
  21. rules:
  22. - host: dashboard.example.com
  23. http:
  24. paths:
  25. - backend:
  26. serviceName: linkerd-web
  27. servicePort: 8084

This exposes the dashboard at dashboard.example.com and protects it with basicauth using admin/admin. Take a look at the Traefikdocumentation for details on how to change the username and password.