I am using Traefik as my ingress controller in Kubernetes. However, I want to use the Kubernetes ingress and the HTTP providers.
I tried to edit the default k3s Traefik pod to add the HTTP provider, but the configuration failed. I have attached the spec part of adding the HTTP provider below.
The endpoint https://apps.example.com/api/traefik
has been tested with a Traefik proxy outside Kubernetes and works fine.
spec:
containers:
- args:
- --global.checknewversion
- --global.sendanonymoususage
- --entrypoints.metrics.address=:9100/tcp
- --entrypoints.traefik.address=:9000/tcp
- --entrypoints.web.address=:8000/tcp
- --entrypoints.websecure.address=:8443/tcp
- --api.dashboard=true
- --ping=true
- --metrics.prometheus=true
- --metrics.prometheus.entrypoint=metrics
- --providers.kubernetescrd
- --providers.kubernetesingress
- --providers.kubernetesingress.ingressendpoint.publishedservice=kube-system/traefik
- --providers.http.endpoint=https://apps.example.com/api/traefik
- --entrypoints.websecure.http.tls=true