I have multiple Apis exposed using traefik ingress. When I type http:// on browser, I want it to be redirected to https://.
I want to have a global redirection from http to https on entrypoint
Traefik helm chart configuration:
ports:
traefik:
port: 9000
exposedPort: 9000
web:
port: 8000
expose:
default: true
exposedPort: 80
redirections:
entryPoint:
to: websecure
scheme: https
permanent: true
websecure:
port: 8443
expose:
default: true
exposedPort: 443
globalArguments:
- "--entryPoints.web.http.redirections.entryPoint.to=websecure"
- "--entryPoints.web.http.redirections.entryPoint.scheme=https"
- "--entryPoints.web.http.redirections.entryPoint.permanent=true"
- "--entryPoints.web.http.redirections.entryPoint.priority=10"
- "--entrypoints.websecure.asDefault=true"
This creates a middleware in traefik:
This is my application ingress.
ingress:
ingressClassName: traefik
enabled: true
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
labels:
app: jaeger
pathType: ImplementationSpecific
hosts:
- jaegar.righive.local
So, now when I type http://jaegar.righive.local, it does not redirect to https://jaegar.righive.local/, instead fails with ERR_CONNECTION_TIMED_OUT