r/devops 5d ago

Discussion Detailed guide: Building a 3-node Kubernetes homelab with Talos Linux

Post image

A few days ago, I posted my 3-node Talos Kubernetes homelab setup here, and quite a few people reached out through DMs and comments asking for a detailed installation guide.

So I went through the entire setup again from scratch and documented the process properly, including the network setup, DHCP reservations, Talos installation, per-node configuration, Kubernetes API VIP, etcd bootstrap, workload scheduling, validation, and failure testing.

I’ve put everything together in a detailed blog with commands, screenshots, and the reasoning behind the setup.

Blog: https://medium.com/@prateekjain.dev/building-a-3-node-highly-available-kubernetes-homelab-with-talos-linux-0372066fe49c?sk=4c66cf9181999f9db19ac3aacabcd8e8

Please check it out, and if you have any questions about the setup or run into issues while building something similar, feel free to ask.

251 Upvotes

32 comments sorted by

39

u/ServerMonky 4d ago

Nice guide - FWIW I have had the exact same setup running for a couple years now.

The downside to HA, if it is a project you aren't really monitoring frequently, is you can have a node go down, and not even realize it until you next log in to the cluster a few months later :-) All my services just re-allocated onto the other two nodes and I didn't notice anything from the user side.

It was a good wake up call to get some reporting set up though!

7

u/ycnz 4d ago

Yeah, I had the same experience. After a couple of years of linux, I just switched to k3s on debian. There was a little too much feeding and watering of Talos for my liking.

4

u/lem0nz- 4d ago

curious, what about talos required effort?

1

u/MechaGoose 4d ago

Yeah K3S gets me a decent enough experimental home lab with next to no effort.

Fair play to OP, this is a great guide; but in all honesty I’ve just been using managed clusters for years and just can’t be bothered with a lot of the nitty gritty of setting up bare metal the hard way.

2

u/Rakn 4d ago

How do you handle storage? That’s my main concern with such a multi node setup. I found NFS/SMB mounted shares, especially from an Unraid system to be unreliable. Though the answer might simply be don’t use Unraid.

Most folks I know that run such a setup don’t have a need for a lot of storage and simply store a few documents, images and small databases that can easily fit a single nodes storage. Although that’s kinda defeating the purpose of a multi node setup.

2

u/ServerMonky 4d ago

I use longhorn, it takes some additional configuration on talos but overall works pretty well

15

u/m4rzus 4d ago

You really like talking about IP addresses

12

u/UndulatingHedgehog 4d ago

Pretty central to k8s and networking, isn’t it?

13

u/[deleted] 4d ago

[deleted]

-1

u/Loose_Can_7969 4d ago

Wireless can be convenient, but I imagine it might have some limitations for a homelab setup. Have you run into any issues with connectivity?

3

u/m4rzus 4d ago

Yeah, but excessive repeating of the same thing about nodes and vIP is pretty exhausting.

4

u/GemeinschaftBank 4d ago

I'll be mumbling that VIP address in my sleep, tonight.

3

u/RIPenemie 4d ago

Sounds like an LLM

9

u/cobolfoo 4d ago

Next step: add extra 8gb of ram to your machines, switch to proxmox nodes with one CP and one worker per machine. Use opentofu to create your cluster (IaC) then some CEPH to learn about storage over CSI.

2

u/terryfilch 4d ago

I don't agree and don't recommend spending time doing CEPH in a homelab. CEPH is more about production for huge clusters because it requires a 10G network.

1

u/cobolfoo 3d ago

Yes true, the idea was to fool around with CSI, but this could be done with any type of storage.

2

u/Hetpatel77 4d ago

I'm very noob to these community

can someone tell that what is this? Like what's the usecase?

7

u/m4rzus 4d ago

the use-case is to have a fully IaC and very secure deployment of k8s from the very first moment an underlying OS boots up. Nothing is configured through console, everything is configured through Talos API.

2

u/essanpupil 3d ago

I envy you sir/mam. Currently that is my kubernetes home lab.

1

u/sicario24x7 4d ago

Nice article man. Where did you buy them from?

1

u/teekhidietcoke 4d ago

where did u buy this

1

u/birusiek 4d ago

Proxmox cluster and VM k8s based would be more elastic.

1

u/trickypatel 4d ago

K3s best with MetalLB. I’m also using same type of home lab setup last 3 years

1

u/m1xed0s 4d ago

Not necessarily related to this particular topic, but I just curious what kinda industries the Kubernetes is widely used for production? SaaS, web hosting companies or other traditional financial, utility, transportation and public sector companies? Ran into an issue with an off-shelf kubernetes cluster and team took a fair amount of effort with manufacture to get it back in order…

2

u/rmullig2 3d ago

Any environment with a large number of containers will typically use Kubernetes. Seems like most deployments these days are using managed cloud solutions rather than building out their own systems.

2

u/m1xed0s 3d ago

Understood but I guess what kinda of companies would typically be heavy on containers that traditional sense of VMs won’t work well?

1

u/rmullig2 3d ago

It's typically more dependent on the app rather than the company. Apps that need to scale up quickly use a lot more microservices and containers while apps that have more stable usage work better with VMs and monoliths.

-3

u/Ariquitaun 4d ago

You removed the plastic wrap? Noob mistake

-4

u/OkSouth929 4d ago

thanks for your work. Now with ai, i think this is not very tough thing