Enabling Traefik Dasboard at k3s

To enable traefik Dashboard in K3s Kubernetes I use:

$ cat is-enabled-traefik-dashboard.yaml 
apiVersion: helm.cattle.io/v1 
kind: HelmChartConfig 
metadata: 
 name: is-enabled-traefik-dashboard 
 namespace: kube-system # Or your Traefik namespace 

spec: 
 valuesContent: |- 
   # Enable the Traefik API and Dashboard 
   api: 
     dashboard: true 
     insecure: false # Set to true for development, false for production

The next is to set the login page credentials:

$ cat traefik-dashboard-auth-middleware.yaml
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
  name: traefik-dashboard-auth-middleware
  namespace: kube-system
spec:
  basicAuth:
    secret: traefik-dashboard-auth-secret # Reference to a Kubernetes Secret containing credentials

To get to the Traefik Dashboard my ingress looks as:

$ cat ingress_specs.yaml
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
  name: traefik-routes
  namespace: kube-system
spec:
  entryPoints:
    - websecure
  routes:
  - kind: Rule
    match: Host(`k3s-apache-php.cn.lan`)
    services:
    - kind: Service
      namespace: kube-system
      name: apache-php-service
      port: 8080
      passHostHeader: true

  - kind: Rule
    match: Host(`k3ssv1.cn.lan`)
    services:
    - name: api@internal     

    middlewares:
    - name: traefik-dashboard-auth-middleware
      
  tls:
    secretName: kube-system-tls-secret

These settings can be deployed. However, I can not find the dashboard using any of:

k3ssv1.cn.lan

k3ssv1.cn.lan/dashboard

k3ssv1.cn.lan/api/dashboard

k3ssv1.cn.lan/api/

I tried to follow the "identify the needed service and create an ingress controller" methodology for the dashboard but it seems my process is missing something...

I am also using self signed certificates…

Any suggestions please?

Thanks in advance

Please format with 3 backticks to preserve spacing.

I just retried with:

$ cat is-enabled-traefik-dashboard.yaml
apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
  name: traefik
  namespace: kube-system # Or the namespace where Traefik is installed
spec:
  valuesContent: |-
    api:
      dashboard: true
      insecure: false # Set to true for development, false for production
    ingressRoute:
      dashboard:
        enabled: true

    ports:
      traefik:
        expose: true

and

 - kind: Rule
    match: Host(`k3ssv1.cn.lan`) && PathPrefix(`/dashboard`))
    services:
    - name: api@internal
      kind: TraefikService
    middlewares:
    - name: traefik-dashboard-auth-middleware

at my ingress and still not able to open the traefik dashboard which was suggested at a google search for "enable traefik dashboard k3s"

Did you check the doc?

Yes,

and I am still confused. As I understand it is necessary to do the next:

a) Enable the Dashboard...
b) Use some port for traefik to listen to the outside world. In my case websecure
c) Create the Ingress route

The example at the previous link for the ingress uses networking.k8s.io/v1 while mine uses traefik.io/v1alpha1 and I am trying to solve the ingress through the latest as all my Ingress paths are governed by just one file using traefik.io/viaplha1. So, is this possible for the Traefik Dashboard? The docs does not say it can not be done...