Skip to content

Instantly share code, notes, and snippets.

@jannegpriv
Last active December 8, 2021 20:30
Show Gist options
  • Save jannegpriv/2ea82c023f4f61a317b1eed217d38004 to your computer and use it in GitHub Desktop.
Save jannegpriv/2ea82c023f4f61a317b1eed217d38004 to your computer and use it in GitHub Desktop.
k3s traefik dashboard activation

Installation steps for K3s traefik dashboard

The steps below requires that you have followed the installation steps for installing K3s on RPIs.

NOTE: The following file can be found in the following repository.

Installation steps for K3s traefik dashboard. On master node, create a folder called k3s-traefik:

Open Helm file:

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

Append dashboard lines to spec.valuesContent, like:

(...)
spec:
  chart: https://%{KUBERNETES_API}%/static/charts/traefik-1.81.0.tgz
  valuesContent: |-
    dashboard:
      enabled: true
    rbac:
      enabled: true
(...)

After save+exit, wait for an existing endpoint:

watch kubectl get endpoints traefik-dashboard -n kube-system

Then apply the following yaml-file to add an ingress route:

kubectl apply -f dashboard-traefik.yaml

NOTE: The activation does not survive a reboot, if the server/VM is rebooted the you need first remove the ingress by:

kubectl delete -f dashboard-traefik.yaml

and then re-add the activation in the helm-file and then apply the ingress again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment