# Existing Traefik server in Docker add Kubernetes ingress

**URL:** <https://community.traefik.io/t/existing-traefik-server-in-docker-add-kubernetes-ingress/16780>\
**Category:** Traefik v2\
**Tags:** kubernetes-ingress, docker\
**Created:** [December 11, 2022, 8:59pm UTC](https://community.traefik.io/t/existing-traefik-server-in-docker-add-kubernetes-ingress/16780 "2022-12-11T20:59:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aschwabe](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/aschwabe/32/6338_2.png) [@aschwabe](https://community.traefik.io/u/aschwabe)\
**Post date:** [December 11, 2022, 8:59pm UTC](https://community.traefik.io/t/existing-traefik-server-in-docker-add-kubernetes-ingress/16780/1 "2022-12-11T20:59:24Z")

</div>

Hi,

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 ?

kind regards  
Alex

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [December 11, 2022, 9:51pm UTC](https://community.traefik.io/t/existing-traefik-server-in-docker-add-kubernetes-ingress/16780/2 "2022-12-11T21:51:46Z")

</div>

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](https://doc.traefik.io/traefik/user-guides/crd-acme/).

---

<div class="post-metadata">

**Author:** ![aschwabe](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/aschwabe/32/6338_2.png) [@aschwabe](https://community.traefik.io/u/aschwabe)\
**Post date:** [December 14, 2022, 11:14am UTC](https://community.traefik.io/t/existing-traefik-server-in-docker-add-kubernetes-ingress/16780/3 "2022-12-14T11:14:41Z")

</div>

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.

BR  
Alex

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [December 14, 2022, 11:20am UTC](https://community.traefik.io/t/existing-traefik-server-in-docker-add-kubernetes-ingress/16780/4 "2022-12-14T11:20:15Z")

</div>

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](https://www.digitalocean.com/community/tutorials/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.
