this post was submitted on 04 Aug 2024
12 points (100.0% liked)

Homelab

371 readers
9 users here now

Rules

founded 11 months ago
MODERATORS
 

I am looming to move to Kubernetes with longhorn as the storage back end. However, I am very confused on how to expose services. Right now I have two reverse proxies to route outside traffic to the appropriate services. I am looking to recreate this in Kubernetes.

What is the easiest way to do this? I am confused about how kubernetes does networking. Is there a easy way to make a service listen on a IP that can be resolved by a reverse proxy?

Edit:

K3s has a built in system

https://docs.k3s.io/networking/networking-services

https://www.virtualizationhowto.com/2022/05/traefik-ingress-example-yaml-and-setup-in-k3s/

top 5 comments
sorted by: hot top controversial new old
[–] lorgo_numputz@beehaw.org 2 points 1 month ago

In a cloud environment just use a Service or an Ingress.

In a data center or bare metal environment I would either use Traefik or install MetalLB to map service endpoints to known addresses.

[–] rglullis@communick.news 2 points 1 month ago

Are you familiar with Traefik in any way? It will really pay off if you do.

[–] bappity@lemmy.world 1 points 1 month ago* (last edited 1 month ago) (1 children)
[–] possiblylinux127@lemmy.zip 1 points 1 month ago (1 children)

Have you ever used MetalML? It seems promising

[–] bappity@lemmy.world 2 points 1 month ago

I use Cilium and Metal LB (if that's what you meant) for my job and it's pretty useful imo