(installed in a EKS k8s cluster behind a classic Load Balancer (ELB))
I am testing Traefik as a replacement for our Nginx-ingress and have done:
- Installed via helm chart and overrode some defaults:
helm upgrade --debug --set="additionalArguments={--accesslog=true,--accesslog.fields.defaultmode=keep, --accesslog.fields.headers.defaultmode=keep,--log.level=DEBUG}" traefik traefik/traefik -n traefik
Aded in the whoami service with an IngressRoute:
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: whoami
namespace: traefik
spec:
entryPoints:
- web
routes:
- match: Host(`whoami.YYY.com`)
kind: Rule
services:
- name: whoami
port: 80
However when I look at the output of whoami, I only see the IP of the AWS ELB:
Hostname: whoami
IP: 127.0.0.1
IP: 192.168.141.105
RemoteAddr: 192.168.137.83:36394
GET / HTTP/1.1
Host: whoami.YYY.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Upgrade-Insecure-Requests: 1
X-Forwarded-For: 192.168.143.223
X-Forwarded-Host: whoami.YYY.com
X-Forwarded-Port: 80
X-Forwarded-Proto: http
X-Forwarded-Server: traefik-6c7b99fdfd-w6km8
X-Real-Ip: 192.168.143.223
How do I get the real client/source IPs to show up in Traefik?
Thanks
V