I've been trying to get client real IP address using traefik with no luck,
that is what i did
clean install of traefik
helm upgrade --install traefik traefik/traefik --set "ports.websecure.tls.enabled=true" --set "providers.kubernetesIngress.publishedService.enabled=true"
i applied the following values file to traefik
image:
name: traefik
service:
enabled: true
type: LoadBalancer
annotations:
# This will tell DigitalOcean to enable the proxy protocol so we can get the client real IP.
service.beta.kubernetes.io/linode-loadbalancer-enable-proxy-protocol: "true"
spec:
# This is the default and should stay as cluster to keep the DO health checks working.
externalTrafficPolicy: Cluster
additionalArguments:
# Tell Traefik to only trust incoming headers from the Digital Ocean Load Balancers.
- "--entryPoints.web.proxyProtocol.trustedIPs=127.0.0.1/32,10.120.0.0/16"
- "--entryPoints.websecure.proxyProtocol.trustedIPs=127.0.0.1/32,10.120.0.0/16"
# Also whitelist the source of headers to trust, the private IPs on the load balancers displayed on the networking page of DO.
- "--entryPoints.web.forwardedHeaders.trustedIPs=127.0.0.1/32,10.120.0.0/16"
- "--entryPoints.websecure.forwardedHeaders.trustedIPs=127.0.0.1/32,10.120.0.0/16"
helm upgrade -f /Users/dbadr/Desktop/K8s/values.yaml traefik traefik/traefik
in the values file i replaced
service.beta.kubernetes.io/do-loadbalancer-enable-proxy-protocol: "true"
with
service.beta.kubernetes.io/linode-loadbalancer-enable-proxy-protocol: "true"
since im using linode not digital ocean provider
i'm still getting the load balancer ip address instad of client real ip address,
can someone please help