What did you do?
Hi, I want to use kubernetes Ingress to visit dashboard, I wrote the belows yaml, it not works
---
apiVersion: v1
kind: Service
metadata:
name: traefik-dashboard
namespace: traefik-system
spec:
selector:
app.kubernetes.io/name: traefik
ports:
- name: web
port: 8000
targetPort: web
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: traefik-dashboard
namespace: traefik-system
labels:
name: traefik-dashboard
spec:
rules:
- host: traefik.my.domain
http:
paths:
- pathType: Prefix
path: /dashboard
backend:
service:
name: traefik-dashboard
port:
number: 8000
IngressRoute is ok
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: traefik-dashboard
namespace: traefik-system
spec:
entryPoints:
- web
routes:
- match: Host(`traefik.my.domain`) && (PathPrefix(`/dashboard`) || PathPrefix(`/api`))
kind: Rule
services:
- name: api@internal
kind: TraefikService
middlewares:
- name: user-auth
What did you see instead?
404
What version of Traefik are you using?
v2.8.0
What is your environment & configuration?
v1.23.9+k3s1
If applicable, please paste the log output in DEBUG level
No response