I have created a Middleware and IngressRoute like in the docs example.
Everything appears to be fine traffic on 443 is working and traefik show in the dashboard that there is a middleware. There aren't any error logs visible.
however everytime I call curl http://domain.com
a 404 is returned.
Also reading the other question here in the forum didn't help.
Redirect Loop with HTTPS redirectScheme suggests to create two routes. Why should be mandatory to have two IngressRoutes? A route itself would no make sense a tls and entryPoints are a level above routes.
- apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: redirect-http-to-https
spec:
redirectScheme:
scheme: https
permanent: true
# INGRESS GRAFANA
- apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: prometheus-operator-grafana
spec:
entryPoints:
- websecure
- web
routes:
- match: Host(`{{ .Values.grafana_domain }}`)
kind: Rule
services:
- name: prometheus-operator-grafana
port: 80
middlewares:
- name: redirect-http-to-https
tls:
secretName: monitoring-grafana-prod-tls
domains:
- main: {{ .Values.grafana_domain }}