Advice for setting up baremetal k8s lab
from KyuubiNoKitsune@lemmy.blahaj.zone to selfhosted@lemmy.world on 12 Feb 02:07
https://lemmy.blahaj.zone/post/38472692

I just got myself some mini PC’s and want to set up a k8s lab to strengthen my skills, I was laid off 8mo ago and haven’t been able to find a new job.

I want to automate everything I can while building this and was just looking for input on how people might recommend I do it.

I was thinking of using pxeboot to install Debian using preseed to automate the installation.

Then maybe install k8s on VMs on the servers, but I’m not sure if I should do that or just keep it on the hosts themselves. They’re decently specced. AMD Ryzen 3 2200 CPUs with 24gb ram and an SSD/NVME combo.

So, any advice for where I should start or tips/tricks?

#selfhosted

threaded - newest

surewhynotlem@lemmy.world on 12 Feb 02:15 next collapse

In the real world, you’re more likely to see multiple vms on each server and each vm running a k8s node. So I’d go with that setup.

Once you have that going, play with clustering services within k8s: Kafka, redis, etcd, postgres.

just_another_person@lemmy.world on 12 Feb 02:18 next collapse

PXE is unnecessary unless you’re going to be creating a reusable boot image. Just faster to use LiveUSB.

What did you getaid off, and what are you trying to apply to? Maybe help to understand on what you’re trying to learn.

Just for your own sanity, just install Talos on the 3 machines, understand how to join them to a cluster, then deploy some stuff around the cluster. Get a feel for the basics before you get into the mess of trying to do it all in VMs.

I’d also check some comparisons on the various flavors of different lube stacks: k3s, microk8s, kubedge…etc. Theres so many now it’s hard to track.

zer0@programming.dev on 12 Feb 02:53 next collapse

I’d highly recommend Talos for this if you haven’t already decided. It’s entirely API driven and immutable. It can be bootstrapped from PXE and truly feels like a local cloud environment.

Fuzzypyro@lemmy.world on 12 Feb 07:26 next collapse

This is the way. They have a image generator too

F04118F@feddit.nl on 12 Feb 11:33 collapse

Talos is amazing and if you want to start from a fully automated setup (GitOps, Renovate), I highly recommend using github.com/onedr0p/cluster-template

sobchak@programming.dev on 12 Feb 03:54 next collapse

I think I’d install proxmox on all machines because there is a proxmox provider for Terraform. Then, manually create the VMs, and to learn the barebones, use kubeadm to set everything up, and kubectl to manage it. Once comfortable and knowledgeable with that, start messing around with Terraform and Ansible.

ccunix@lemmy.world on 12 Feb 06:38 next collapse

I run k3s on my bare metal cluster and for a lab I think it is excellent. Gets the cluster up and running easily so you can learn about actual Kubernetes stuff.

Personally I run it on fedora coreos, but I would not recommend that for everyone. I would just use whatever distri you like. All the usual suspects will work perfectly.

itwars@jlai.lu on 12 Feb 12:35 next collapse

Check out this repo: github.com/khuedoan/homelab (I’m just a fan)!

relaymoth@sh.itjust.works on 12 Feb 13:41 collapse

I’ve been setting up a baremetal Talos-based cluster on 4 SFF machines and using Flux to declaratively deploy things to the cluster. Once you wrap your head around how Flux operates, deploying things becomes fairly straightforward.

For me, the most difficult process was deploying the cluster properly, but the recent-ish video posted on the Tailscale YT channel helped a LOT.