When trying to use traefik as a reverse proxy for external services, it only proxies to the host directly and ignores the path and only sends the host itself. Does anyone have any idea why this is not passing the path?
Ingress:
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.priority: "10"
traefik.ingress.kubernetes.io/router.tls: "true"
name: domain-tld
spec:
rules:
- host: domain.tld
http:
paths:
- backend:
serviceName: public-external-name
servicePort: 443
path: /path
tls:
- hosts:
- domain.tld
secretName: domain-tld
ExternalName:
apiVersion: v1
kind: Service
metadata:
name: public-external-name
spec:
type: ExternalName
externalName: mypagesrepo.github.io
ports:
- port: 443
Log of failure:
{"ClientAddr":"10.120.0.3:38798","ClientHost":"10.120.0.3","ClientPort":"38798","ClientUsername":"-","DownstreamContentSize":5142,"DownstreamStatus":404,"Duration":18464933,"OriginContentSize":5142,"OriginDuration":18342096,"OriginStatus":404,"Overhead":122837,"RequestAddr":"domain.tld","RequestContentSize":0,"RequestCount":156112,"RequestHost":"domain.tld","RequestMethod":"GET","RequestPath":"/path/","RequestPort":"-","RequestProtocol":"HTTP/2.0","RequestScheme":"https","RetryAttempts":0,"ServiceAddr":"mypagesrepo.github.io:443","ServiceName":"namespace-public-external-name-443@kubernetes","ServiceURL":{"Scheme":"https","Opaque":"","User":null,"Host":"domain.tld:443","Path":"","RawPath":"","ForceQuery":false,"RawQuery":"","Fragment":""},"StartLocal":"2020-08-14T04:55:55.126388322Z","StartUTC":"2020-08-14T04:55:55.126388322Z","entryPointName":"websecure","level":"info","msg":"","time":"2020-08-14T04:55:55Z"}