I'm current using a ingress for the dashboard with a basic auth middleware. But is current not asking for a password.
ingress:
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: traefik-dashboard
namespace: traefik-system
spec:
entryPoints:
- web
- websecure
routes:
- match: Host(`traefik.internal.kugelbit.com`) # Hostname to match
kind: Rule
services: # Service to redirect requests to
- name: api@internal # Special service created by Traefik pod
kind: TraefikService
middlewares:
- name: traefik-auth
namespace: traefik-system
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: traefik-auth
namespace: traefik-system
spec:
basicAuth:
secret: traefik-auth
kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: traefik-system
secretGenerator:
- name: traefik-auth
files:
- users
generatorOptions:
disableNameSuffixHash: true
resources:
- dashboard-ingress.yaml
file users has generate with the command htpasswd -c users admin
The dashboard shows the routers and middlewares: