K3S: Traefik Dashboard activation

I usually edit the Helm chart directly on the master by SSH-ing into it as user rancher:

sudo vi /var/lib/rancher/k3s/server/manifests/traefik.yaml

apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
  name: traefik
  namespace: kube-system
spec:
  chart: https://%{KUBERNETES_API}%/static/charts/traefik-1.81.0.tgz
  set:
    rbac.enabled: "true"
    ssl.enabled: "true"
    metrics.prometheus.enabled: "true"
    kubernetes.ingressEndpoint.useDefaultPublishedService: "true"
    image: "rancher/library-traefik"
    dashboard.enabled: "true"             # <-- add this line
    dashboard.domain: "traefik.internal"  # <-- and this one with a resolvable DNS name

Helm will pick up the changes automagically and the dashboard will be available under http://traefik.internal/dashboard/.
Keep in mind that after a reboot of the master the file will be restored without the added lines.

1 Like