http:
middlewares:
my-node-prefix:
replacePath:
path: '/{{ env "MY_KEY" }}'
autodetect:
contentType:
autoDetect: true
routers:
my-node:
middlewares:
- autodetect
- my-node-prefix
entryPoints:
- mine
rule: Host(`traefik.base.svc.cluster.local`)
service: mine
services:
mine:
loadBalancer:
healthCheck:
path: '{{ env "MY_KEY" }}/health'
interval: 60s
timeout: 3s
servers:
- url: https://my-node.goes.here.com
I've been trying to setup a simple reverse proxy where a request comes into traefik from within the kubernetes cluster to: http://traefik.< my-namespace >.svc.cluster.local:8080
or even http://traefik.< my-namespace >.svc.cluster.local/mine
but I'm getting a 401 response.
I need Traefik to add a URI of "/${MY_KEY}", because this is how the upstream server requires auth.
I think the healthcheck is working because the logs show: {"level":"debug","msg":"Routine health check refresh for backend: mine@file","time":"2024-01-17T07:05:00Z"}
What am I doing wrong here?