i have a working Traefik server running in Docker, with a provider for Docker.
i also have a kubernetes environment, and i was wondering if i can simply add a kubernetes provider to the existing Traefik server, so it handles both the docker cluster and the kubernetes cluster.
The documentation is a bit confusing, and the examples are either one or another.
Do i need to add an agent or something to the kubernetes cluster or can traefik directly connect to it ?
I doubt this simply works. With Traefik and your service in Docker, they can use Docker networking to communicate. I don't see how Traefik in Docker could forward to k8s services without being part of k8s.
Maybe check the guide Traefik & CRD & Let's Encrypt.
Sorry for the late reply,
i read that guide but i don't want to / can't run a second traefik for the same external ports.
There is a way to add providers in traefik, so you can only run one, i am just new tu kubernetes and have no clue what i need to configure to run it / connect it to traefik.
If i run traefik deployed on kubernetes i can just add a second provider and connect it to the docker sock and both work just fine.
For Kubernetes you can do something similar, but i assume you need to add next to ingress class something else so it connects, that's mostly where i am stuck.
Personally I can't help, only using Docker Swarm. I feel kubernetes is just way too complicated, see example "How To Secure Your Site in Kubernetes with cert-manager, Traefik, and Let’s Encrypt".
You do have a lot of options with k8s, especially if you manage 100.000 server like Google & Co, but for small scale it might be a bit too much.