K3s-cluster/dashboard/ingress.yaml

29 lines
613 B
YAML
Raw Normal View History

apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: stripprefix
annotations:
kubernetes.io/ingress.class: "traefik"
spec:
stripPrefix:
prefixes:
- /dashboard
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: kubernetes-dashboard-ingress
namespace: kubernetes-dashboard
annotations:
"traefik.ingress.kubernetes.io/router.middlewares": default-stripprefix@kubernetescrd
spec:
entryPoints:
- web
routes:
- match: Host(`localhost`)
kind: Rule
services:
- name: kubernetes-dashboard
port: 80