How to Set Up OpenShift-like Routes in My K8s Homelab?

0
0
Asked By CuriousCat123 On

Hey everyone! I'm experimenting with Kubernetes in my homelab, and I'm missing the Routes feature from OpenShift, which I found really useful at work. I've come across a few options like MetalLB and using Ingress with edited host files or custom DNS servers, but I'm looking for a solid recommendation. Ideally, I want a DNS server running within K8s that handles DNS names automatically. This way, I could point my router to this DNS server, and all my clients could access the URLs without needing to edit host files or manually add DNS entries. I'm currently using K3s and Flux, and I want to keep my setup Kubernetes-independent for easier switching between distributions. Any ideas?

2 Answers

Answered By CodeMasterX On

Have you checked out the external-dns project? You can find it at https://github.com/kubernetes-sigs/external-dns. It automates DNS entries for you, which might help with the setup you're envisioning. Combine that with MetalLB and Ingress for routing, and you should be good to go!

CuriousCat123 -

Thanks, I'll definitely look into it!

Answered By TechWhiz45 On

While I haven't used OpenShift, from what I've seen, the Routes feature is pretty much like Ingress objects. I'd recommend using Traefik as your ingress controller—it’s user-friendly and works well. MetalLB can help too by assigning a single VIP to your ingress service, where you can set up your domains and TLS certificates. Incorporating these tools could get you a setup similar to what you're looking for!

OpenShiftGuru88 -

Totally agree! The main difference is that OpenShift had Routes before the Ingress API was widely adopted. Using Nginx ingress with MetalLB should cover most of your needs.

DNSSeeker -

Sounds interesting! But I'm curious about how your DNS works. Do you still need to map the domain names to the IP that MetalLB provides? Any repos or docs you could share?

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.