Right, so the lego parts haven't arrived yet. But the next 3 PoE+ hats for the next 3 nodes did!
Another thing that came in are two USB extension cables. Mainly got those to experiment with less tension on the USB <=> SATA cable
Yay! The #LEGO parts for experimenting just came in!
And the big frames to the right might be come a key part in making #LEGO node blades:
Even though this first attempt failed, it does make it look promising:
Made scale model pillars with diagonal beams for sturdiness but still some movement possible (had bigger ones with the green bars but didn't take a photo), for connecting the blades to:
Adding another big frame at the bottom makes it all even more stable:
Had another go at this tonight, and managed to get the RPI and SSD into the cube. Not perfect but getting there 😎
It was interesting to see the amount of traffic flowing through the cluster: https://t.co/IqhxR1XEwE
Cees-Jan Kiewiet (@wyri@haxim.us) on Twitter

“This seems to be fairly normal (k8s cluster) amount of traffic for my WIP cluster:”

Twitter
But sadly had to declare it dead after ETCD decided it ran out of storage: https://t.co/LEmDZxPyGw
Cees-Jan Kiewiet (@wyri@haxim.us) on Twitter

“R.I.P. Home #Kubernetes cluster”

Twitter
So preparing (with k3d) for a triple master cluster, S3 backup and snapshot and automatic recovery before starting it again. Will then do a series of chaos engineering tests to make sure it's resilient against power outages etc etc.
The triple master set up will have each master node on a different switch (!!!) (or access point). Mainly because one of the masters will replace my Raspberry Pi 1 that reads information from the smart meter in this house. The other extra master will have a special purpose.
The meterkast (utility closet) node casing and storage just came in. Never realised M.2 SSD's are so, tiny 😱
Yay! The fine folks at #LEGO_Group seem to have caught up with the custom bricks orders after the holidays zerg 🎉. So I can put together the node #lego enclosures in a few days and start the cluster back up.
Still going for the 3 master setup in the long term, but since I can already start it up with a single master going to focus on building and testing power outage and recovery testing. Hopefully including having a fresh node every time it starts, including the master 🤐
This is a first for me! #LEGO_Group put the custom bricks order in a box 😱. Building the node kube's tonight 🎉. Probably powering the cluster back up next week, and hopefully the more space between components should make it require less active cooling
Hah, progress! But seems I'm missing parts, connector pegs to be specifically so I can't do anything at the moment. Good thing I ordered 200 of those the other day. Might need a few more parts, so another #lego order will go out soon 🤣. But really loving the progress here 😍
Started prototyping a #Kubernetes node with a screen. Next steps are starting X and a browser in kiosk mode
Another big milestone. A new RPI 4 8GB came in, so I can start assembling the utility closet master node:
It's been a decade of two since I had to do configuration through jumpers
There is only one issue. Doing rapid rebuilding of the cluster to test things out is going to be a lot harder because this one won't be as easy to access as the others currently are...
Got it up and running at least https://t.co/0s4snsqtBh and while I love the #argon_forty casing I still think defaulting to using the USB3 instead of the USB2 port will leave plenty of users with I/O issues.
Cees-Jan Kiewiet (@wyri@haxim.us) on Twitter

“Set up a #kubernetes node that said, it's simple they said. 8 cables later:”

Twitter
#argon_forty All the nodes in my #k8s cluster run on SSD's on the #USB v2 port because the v3 port has stability issues. Couldn't even write the image to the M.2 #SATA #SSD using the v3 port. Hence the extension cables to hook it to the v2 port. So it has a tail:
But at least I now have two leader nodes, and I'm getting errors like this during some #terraform calls:
Whoop whoop, the #LEGO parts I ordered 6 weeks ago just came in! Time to finish the current enclosures and start with building the tower to put them in
The end result of tonight's thinking with the new #lego parts that came in. Fully hanging node enclosure with room to make it more blade-like/slide it in and out for easy maintenance but that is for another time. Plus the black technic baseplates are amazingly solid <3
The end result for tonight, it is not perfect, and there should be another set of parts arrive in two weeks, but we're getting there. Going to have to order more baseplates tho, those things are awesome and will make the whole project stable af.
Had a small set of #LEGO pieces come in a few days ago. And I finally managed to get a good and sturdy solution for the SSD, and also the RPI, which was a bit tricky with the SSD already in it. Making it about 90% done, the final thing I really want is a way to slide it in and
the enclosure tower. Because maintenance with everything fixed in place will be messy.
Alright, the new leader node was put into position earlier today:
Time to start terraforming this thing!
TR apply 1 done:
And that is TF apply 2 done:
And that is the 3rd TF apply done. The (almost) full cluster back up in 3 commands and about 30 minutes of waiting for everything to be installed and back to running:
Next up is rook as a potential replacement for longhorn to use NFS/ISCSI for storage instead. Longhorn is really cool, but with my current number of cluster reinstalls I'm looking for something easier to recover data with
Today I started with all 4 nodes running
The day ends with only two running because I don't need more, so why would I
Realised today that I could just stack all 3 into one tower above each other. Like the intended result:
Infinity Gauntlet in meeting mode for scale
Another win for the cluster today is the set up of NFS as PVC storage backend. The SSD's are useful and Longhorn did do what is intended to do. But NFS survives cluster reinstalls. And trying to KISS it here: https://t.co/AwqmBDit7w
Cees-Jan Kiewiet (@wyri@haxim.us) on X

@achetronic Yeah this took me less time to set up and get running than I spent today reading up on Rook:

X (formerly Twitter)
Installed #linuxserverio's Heimdall on the cluster today. A bit sad the #Unifi app isn't an enhanced app, but I'm pretty sure I can muster up writing some #laravelphp to turn it into an enchanted app 🤔
#linuxserverio #laravelphp Had lots of fun this weekend building a platform above the switch. Starting out with these half perfect towers (the top still needs diagonal support before adding more nodes):
#linuxserverio #laravelphp The switch is placed in the middle on top of the middle blue statch for additional support:
#linuxserverio #laravelphp It looks big, and it is big but this finally means I can start working on a long term cabling plan and have plenty of space underneath the switch to do so and for cooling:
#linuxserverio #laravelphp During the placement (without anything going down FYI), I found a slight miscalculation:
#linuxserverio #laravelphp After fixing that it has been standing fine like this for a day now. Just need to make the space between the top of the switch and the node platform smaller:
Really happy with the results of this weekend. Swapping all of this when all the nodes where up and running and my wife was playing online games that went through this switch made it "fun" as at some point I had the live running nodes on my lap while trying to get the switch in
That thing looks like an abstract painting at night 😍
Had some fun yesterday prototyping an easy way to support maintenance/swap nodes out without having to take the rack apart:
Think I found a good way to try and keep the cats off the platform, or at least detect when they get up it:
Worked on a PoC to make adding and removing node enclosures easier by not directly making them part of the structure. But instead by putting them on a cart you can take out:
First "big" success of the cluster: https://twitter.com/WyriHaximus/status/1534893994731352066 (sorry no Toot)
Cees-Jan Kiewiet (@wyri@haxim.us) on X

Nearly 10 years ago my first @Raspberry_Pi arrived. Two years later we moved to a different house. And last weekend, 8 years after that I finally took it off DSMR P1 duty and offline (for now). As it has been succeeded by a #kubernetes node running @home_assistant:

X (formerly Twitter)
Also, it looks like I missed the first birthday of the project (and thread): https://toot-toot.wyrihaxim.us/@wyri/109858081844775179
Cees-Jan Kiewiet :rp: :wm: (@wyri@haxim.us)

Content warning: Kubernetes home lab using lego thread imported from Bird site

Mastodon
The #LEGO node enclosure for Reality came out pretty well last night. Been iterating over this design for months and it's come together really well. Both the #raspberrypi and the #SSD in it are well kept in place. All supervised by #deathwing_t_cat who just wanted a nap 🤣.
Don't try this at home:
Made them in other colours as well, only purple is left to be build:
Came upstairs this morning and found out a certain cat has been on the cluster during the night and made a mess. Now the cool part is that this shows the latest iteration of node enclosure kept the SSD in place for those two nodes:
Been doing maintenance on the cables in the home office today, and as such 3/4 of the cluster was down for a few hours today:
It came back up with the switch in its new raised position after I took the old raise down for redesigning. And you might notice that the #IKEA cabinet it was on is no longer standing, but is now lying on it's side providing double the space and a lot more height to work with:
Now I can put all the nodes directly on the cabinet instead of stacking them on unstable towers. There will be a better more epic #LEGO #MOC to it all once I've figured it all out. But for today I'm happy with the progress:
Cees-Jan Kiewiet (@wyri@haxim.us) on X

It came in today 🎉!

X (formerly Twitter)
×
Internal cable management still needs some work 🤣
Table of contents for the blog series of this project incoming in a week or two: https://twitter.com/WyriHaximus/status/1580295782783016960
Cees-Jan Kiewiet (@wyri@haxim.us) on X

Started writing the first blog post of this Twitter thread: https://t.co/iuUdBOHixy

X (formerly Twitter)

Ok the ToC is up a bit earlier: https://blog.wyrihaximus.net/2022/10/building-a-kubernetes-homelab-with-raspberry-pies-and-lego-table-of-contents/

Partly because it was quick and easy to write. Onto a post with more insights

Building a kubernetes homelab with Raspberry Pi and Lego: Table of contents

For years I've been using Raspberry Pi's to do in home automation. One of the major constraints was maintenance, if one goes down I have to look at it while things are down. This made running Home Assistant less than ideal. After working with Kubernetes for a few years I decided to bring it into my home permanently. But with a challenge, by using Lego. During the Pandemic we got back into building Lego and this is a way for me to bring my Lego skills to the next level. The post is probably the most boring one as it is the table of contents. However, it will be updated every time a new post is published. Also, posts won't be written in a logical order but more in order of the things that are already done. As such the "Home Assistant" post will come before the "Node Software set up" post because the former can be done again without changes or data loss due to the "Terraform" and "Storage" posts.

Cees-Jan Kiewiet's blog
Building a kubernetes homelab with Raspberry Pi and Lego: Persistent Data Storage for PVC's

While most apps are stateless, the often do need to store state somewhere. In Kubernetes you can use a Persistent Volume Claim. That claims a piece of storage for the pod for now and in the future.

Cees-Jan Kiewiet's blog
The #lego parts for the RJ45 plug holders came in today. Here is one of them I build to make sure the parts and idea fully worked. But since we put the parts in a personal advent calendar it's going to take up to christmas before all of them are assembled and on their spot.
My little junior OPS mentee is really excited about his role managing the #home #lego #kubernetes #raspberrypi #cluster, down to the sniffing
3/6 RJ45 holders pick up from the advent calendar, with 3 to go and 4 days left it should be straight forward getting the last 3 as well before I can start hooking them up at the rear of this MOC
Meet #time, the new node that will trial https://www.talos.dev/
Talos Linux

Talos Linux The Kubernetes Operating System What is Talos Linux? Talos Linux is Linux designed for Kubernetes – secure, immutable, and minimal.

TALOS LINUX
#SSD and the #USB to #SATA adapter are coming later this week and early next week. If all goes well with https://www.talos.dev/ it will replace k3os. This is also the first time in 9 months I got my hands on a #raspberrypi 4 8GB, thanks to #kiwielectro
Talos Linux

Talos Linux The Kubernetes Operating System What is Talos Linux? Talos Linux is Linux designed for Kubernetes – secure, immutable, and minimal.

TALOS LINUX
#kiwielectro Put the #RJ45 blocks in place, it's going to make managing cable a lot easier now. In the end, each node will have matching cables because both sides of the row are on the other side cables 🤣.
Cables are still somewhat messy but this is a good step in the right direction. Already have some ideas for the next steps, including a nice exit hole for the power cable
Had another experiment yesterday to be able to slide the #raspberrypi #kubernetes node enclosure in and out of the #lego MOC. The bottom is pretty solid. But the higher I got the worse it got. Sliding in and out is great, needs some tweaks but it will work. The network and #USB
cables I wanted to plug in behind it. But that would mean getting deeper and under the roof (the "roof" shown in the photos for sure won't make it into the final version). So considering making plugs in the side to plug the node into MOC.
Installed #SideroLabs' #talos on #time (upper right) as a possible replacement for #k3s/#k3os.
#SideroLabs So far so good! Going to do some firewall tests to lock down the cluster vlan to only what is needed over the weekend.
#SideroLabs One of the things that is always important with computers is cooling them. So as such, I have a fan from #hema to cool the nodes. And right now it is always on, but I already connected a #shelly_IoT plug to be able to only turn it on when the nodes get hot enough that they need
#SideroLabs #HEMA #shelly_IoT some help cooling down. The automation isn't in place yet, but I already started preparing for it :).
If the experiments with https://www.talos.dev/ are positive, it will replace k3os. One of big plusses is that this is #k8s and not #k3s so I should be able to use the clusterautoscaler for autoscaling. Which needs some code to work with #unifi switches.
Talos Linux

Talos Linux The Kubernetes Operating System What is Talos Linux? Talos Linux is Linux designed for Kubernetes – secure, immutable, and minimal.

TALOS LINUX

This #kubernetes #lego #raspberyrpi thread is now fully imported and can be found:
* On #Mastodon: https://toot-toot.wyrihaxim.us/@wyri/109858081844775179
* On Twatter: https://twitter.com/WyriHaximus/status/1404501201438261260

Regular updates will now resume 🎉

Cees-Jan Kiewiet :rp: :wm: (@wyri@haxim.us)

Content warning: Kubernetes home lab using lego thread imported from Bird site

Mastodon
One of the biggest things is that since half a year ago the cluster is now fully on https://www.talos.dev/ and managed through #terraform. It's been a use success and a quick and easy move. (Well it took me a day tho.) It is also a lot easier to rebuild nodes:
* Write raw image to disk
* Apply TerraForm
Talos Linux

Talos Linux The Kubernetes Operating System What is Talos Linux? Talos Linux is Linux designed for Kubernetes – secure, immutable, and minimal.

TALOS LINUX
The second biggest thing is that, since a couple of days ago, the cluster has not 1 but 3 control plane nodes. And for some reason hours before I started working on adding the other two the only one running then crapped out: https://toot-toot.wyrihaxim.us/@wyri/111165411454560918
Cees-Jan Kiewiet :rp: :wm: (@wyri@haxim.us)

Attached: 1 image An hour before I wanted to add two more controlplane nodes to my home #k8s cluster the current single one stopped responding to API calls 🤦

Mastodon