Felipe Martín

Homelab

Welcome Hugo

August 9, 2024

Yes, it finally happened. I moved my site to Hugo.

I’ve been wanting to do this for a long time but I never found the motivation to do it so I kept postponing it.

It took a while, but I’m happy with the result. I’m still tweaking some things here and there but there are some goodies already around, like dark mode, new font, different accent colors, …

This is just the beginning, I will keep improving it as I go, and adding a few sections that I have already planned.

Read more »

Keep it simple, stupid.

August 8, 2024

There’s a moment to play, there’s a moment to read, to rest, to listen to music… we need to choose how, when and how much of our time we spend on each area we like. As someone with multiples hobbies, it’s very difficult to find balance between them.

These past few days weeks months, after writting a few blog posts about my k3s infra and having some headaches around stuff I kept thinking… is this worth it? I’m doing it to fiddle around with it and learn, and that’s a good thing. The problem is there are a lot of other areas I want to learn from and I need to schedule my time accordingly.

Read more »

Journey to K3s: Accessing from the Outside

April 28, 2024

Up until now I have been working locally (on my home network). While that is enough for most of the services I’m running I need to access some of them from the outside. For example, I want to expose this blog to the internet and access Miniflux to read my RSS feeds on the go.

There are a few ways to achieve this but I have some specific requirements that I want to meet:

  1. Zero-trust approach: I don’t want to expose the services directly to the internet.
  2. Public services: Other clients apart from me should be able to access some of the services.
  3. Home IP safety: Don’t directly expose my home IP address. (This is on par with #1, but I want to make it explicit).
  4. On-transit encryption: Full on transit encryption from the client to the cluster with no re-encryption in the middle.
  5. No Cloudflare. (Breaks #4)
  6. No Tailscale. (Breaks #2, also there are other users at home and I don’t want to have the Tailscale client running all the time).

What does this leave me? A reverse proxy server.

Read more »

Journey to K3s: Basic Cluster Backups

April 21, 2024

There a time to deploy new services to the cluster, and there is a time to backup the cluster. Before I start depending more and more of the services I want to self-host it’s time to start thinking about backups and disaster recovery. My previous server have been running with a simple premise: if it breaks, I can rebuild it.

I’m going to try and keep that same simple approach here, theoretically if something bad happens I should be able to rebuild the cluster from scratch by backing up cluster snapshots and the data stored in the persistent volumes.

Longhorn screenshot displaying ongoing backups

Read more »

Importing data manually into a longhorn volume

April 9, 2024

I was in the process of migrating Shiori from my docker environment to the new k3s cluster I’m setting up. Shiori is a bookmarks manager that uses an SQLite database and a folder to store the data from the bookmarks. I didn’t want to switch engines just yet since I want to improve SQLite’s performance first, so I decided to move the data directly to a longhorn volume.

This probably is super simple and vastly known but it wasn’t clear for me at first. Posting it here for future reference and for anyone that might find it useful.

Read more »

Journey to K3S: Deploying the first service and its requirements

March 25, 2024

I have my K3S cluster up and running, and I’m ready to deploy my first service. I’m going to start migrating one of the simplest services I have running in my current docker setup, the RSS reader Miniflux.

I’m going to use Helm charts through the process since k3s supports Helm out of the box, but for this first service there’s also some preparation to do. I’m missing the storage backend, a way to ingress traffic from the internet, a way to manage the certificates and the database. Also, I need to migrate my current data from one database to another, but those are postgresql databases so I guess a simple pg_dump/pg_restore or psql commands will do the trick.

A screenshot showing the miniflux namespace in my k3s cluster with healthy pods and a request to the internal ingress endpoint showing a 200 status code

Read more »

Journey to K3S: Basic cluster setup

March 14, 2024

I’ve finally started to play with K3S, a lightweight Kubernetes distribution. I have been reading about it for a while and I’m excited to see how it performs in my home lab. My services have been running in an Intel NUC running Docker container for some years now, but the plan is to migrate them to a k3s cluster of three NanoPC-T6 boards.

I was looking for a small form-factor and low power consumption solution, and the NanoPC-T6 seems to fit the bill. I know I’m going to stumble upon some limitations but I’m eager to see how it goes and the problems I find along the way.

My requirements are very simple: I want to run a small cluster with a few services, and I want to be able to access them from the internet and from my home. My current setup relies on Tailscale for VPN and Ingress for the services, so I’m going to try and replicate that in this new setup.

Picture of three nanopc-t6 computers on top of each other running k3s

Read more »