Getting started with Traefik
Alex Richards
503

Thanks for the article Alex.

I’ve tried adding a traefik configuration to redirect http=>https (from https://medium.com/@patrickeasters/using-traefik-with-tls-on-kubernetes-cb67fb43a948)

defaultEntryPoints = ["http", "https"]

[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"

But:

1). I then get the following error on startup:

Error loading entrypoint configuration for frontend www.myserver.com: Unknown entrypoint http”

HTTPS requests still work, but HTTP requests return ERR_CONNECTION_RESET or ERR_EMPTY_RESPONSE (and nothing seems to be logged by traefik).

2). I assume this also requires exposing port:80 on the ELB Service definition (so that traefik can redirect non-SSL requests?) E.g.,

apiVersion: v1
kind: Service
metadata:
name:
traefik-proxy
annotations:
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-1:XXX:certificate/XXX"
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "http"
spec:
type:
LoadBalancer
selector:
app:
traefik-proxy
tier: proxy
ports:
- port: 80
targetPort: 80
name: http
- port: 443
targetPort: 80
name: https

Thanks.

Like what you read? Give richburdon a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.