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.