How Can I Expose My Apps on a 3-Node Kubernetes Cluster with Traefik and MetalLB?

0
7
Asked By TechWhiz42 On

Hey folks! I'm running a 3-node Kubernetes cluster on my VPS—1 control node and 2 worker nodes—and I'm trying to host my company's applications, which include a frontend, backend, and database, on one of the worker nodes. So far, I've set up Traefik as my ingress controller and configured MetalLB to act as the local load balancer. Now I need some help exposing these applications to be accessible through either my VPS's public IP or one of my domains that I own. I'm a bit lost on the correct steps or configurations to make this happen with Traefik and MetalLB in place. Any guidance would be much appreciated! Thanks a bunch!

1 Answer

Answered By CloudGuru88 On

MetalLB is designed to expose services to the L2 network with the IPs you set. To get your apps up and running, you’ll need to configure MetalLB to expose Traefik. Then, Traefik can route requests for different app domains, like app.example.com, to their respective backend services using HTTP header requests. If you're not super familiar with Traefik, you might find nginx-ingress easier to manage, as it generally has a simpler configuration process.

SimplyCurious -

I've managed to expose Traefik using MetalLB, and it’s got an external IP now. But I'm trying to figure out how traffic from the internet reaches my VM running the Kubernetes cluster. Do I need to set up port forwarding or something like a reverse proxy on the host? What's the best way to ensure that traffic gets to Traefik inside the VM?

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.