From 12c13c5719c1a819f1133a2e494afdf0914578da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Henrique?= Date: Mon, 18 Aug 2025 18:37:48 -0300 Subject: [PATCH] updating things --- README.md | 7 ++++- config.yml | 3 +++ content/posts/home-k8s.md | 56 +++++++++++++++++++++++++++++++++++++++ content/posts/selfhost.md | 25 +++++++++-------- 4 files changed, 77 insertions(+), 14 deletions(-) create mode 100755 content/posts/home-k8s.md diff --git a/README.md b/README.md index 2796830..f6de548 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,9 @@ -# [Personal website](https://ivanch.me) +# [Personal blogging](https://blog.ivanch.me) + +This will be eventually migrated to an embedded page on my website. + + +# Local dev (notes for myself really) ## Running 1. `git submodule update --init --recursive` diff --git a/config.yml b/config.yml index 6d3ee98..a06e0cc 100755 --- a/config.yml +++ b/config.yml @@ -6,6 +6,9 @@ params: Content: | Nothing good around here, maybe you misclicked. But if you're here, you can check my [resumé](https://drive.google.com/file/d/1oYf68qKXUnBz7d4qjHX-hTw_-f5EKgeF/view) + or my [home page](https://ivanch.me/). + + I also self-host some pretty cool stuff. socialIcons: # - name: "Instagram" diff --git a/content/posts/home-k8s.md b/content/posts/home-k8s.md new file mode 100755 index 0000000..e45d879 --- /dev/null +++ b/content/posts/home-k8s.md @@ -0,0 +1,56 @@ +--- +title: "Homemade Kubernetes" +date: 2025-08-18T10:30:00-03:00 +draft: false +summary: Why I went with k3s for local homelab. +--- + +tl;dr: wanted to learn k8s properly and wanted some high availability for some services. Also solves loneliness ;) + +--- + +I started to have some issues in regards to high availability for some services. I wanted to make sure that my self-hosted applications would remain accessible even if one of my servers went down (like Jellyfin). This led me to explore Kubernetes as a solution. + +As you may or may not know, k8s is a container orchestration platform that automates the deployment, scaling, and management of containerized applications. However it comes with a lot of complexity and operational overhead. I tried to set up a k8s cluster using [k3s](https://k3s.io/), which is a lightweight version of Kubernetes. It seems to be a good starting point, I'm using it since then and has been working wonders so far. + +Currently I'm running them while all config files are on a NFS server, this makes managing configurations easier and backup-ready. For this, I'm using `nfs-subdir-external-provisioner` to manage PVCs through NFS. I have also setup 2 backup cronjobs: one for local servers and another for a remote server. + +## Pros and cons + +Pros that I have noticed: +* **Easy to set up and manage**: k3s is designed to be lightweight and easy to install +* **High availability**: if a server goes down, I can still access the services in there + * I haven't been able to properly set a HA k3s cluster yet as I need more hardware + * Currently, I'm using a single master-node setup +* **Backups** are easy to manage if you have all configurations under one place. +* **Cronjobs** are a breeze to set up and manage, mainly if you need to perform backup rituals. +* **"Enterprise-grade"** cluster in your home! +* **Have fun :)** + +Cons: +* **Complexity**: While k3s simplifies many aspects of Kubernetes, it still requires a certain level of understanding of container orchestration concepts. +* **Single-point of failure**: In my current setup, the single master node is a potential point of failure. If it goes down, the entire cluster becomes unavailable. + * This can be solved with a multi-master setup, but it requires additional hardware. +* **Learning curve**: Kubernetes has a steep learning curve -- which is good for people like me. + +## Current setup + +This is my current (might be outdated) setup: +* 2 Orange Pi running k3s + - Each with 4 GB RAM, 4C/4T, 256GB SD card on each. +* 1 Mini PC + - 6 GB RAM, 2C/4T, 64GB internal memory + 512GB SD Card +* Proxmox + - 32 GB RAM, 6C/12T, 1 TB SSD + - Currently I run these VMs with k3s: + - 1 prod-like VM + - 1 dev-like VM + - 1 work sandbox VM + +At a tech level, I haven't made my setup / scripts / configurations public yet. + +--- + +I believe that everyone should try this at home, be in a dedicated hardware/server or in a VM. It's a great way to learn and experiment with Kubernetes in a controlled environment. + +I'm still running some services on Docker itself, but I'm slowly migrating them to k8s. Some services like DNS and Traefik Reverse Proxy are a bit more complex to set up. \ No newline at end of file diff --git a/content/posts/selfhost.md b/content/posts/selfhost.md index 1b79865..a5338c8 100755 --- a/content/posts/selfhost.md +++ b/content/posts/selfhost.md @@ -5,7 +5,7 @@ draft: false summary: "Everyone should have Netflix at home" --- -Those are some of the services that I use currently and that I find very useful. But maybe the hobby is going too far... +[Why I'm slowly changing to Kubernetes.](https://blog.ivanch.me/posts/home-k8s/) # Honorable Mentions: * [Proxmox VE](https://www.proxmox.com/) - Got put those VMs somewhere. @@ -15,35 +15,34 @@ Those are some of the services that I use currently and that I find very useful. ## Necessary ones * [AdGuard](https://hub.docker.com/r/adguard/adguardhome) - DNS-based Adblocker service (also useful to block malware and other unwanted things). * Easy setup alternative: [PiHole](https://hub.docker.com/r/pihole/pihole) - Same thing, but easier to setup. -* [Portainer](https://www.portainer.io/) - Container management. - * Lightweight alternative: [Dockge](https://dockge.kuma.pet/) - Container and Compose management. -* [Nginx Proxy Manager](https://nginxproxymanager.com/) - Reverse proxy manager. - * Alternative: [Caddy](https://hub.docker.com/_/caddy) +* [Dockge](https://dockge.kuma.pet/) - Container and Compose management. + * Alternative: [Portainer](https://www.portainer.io/) - Container management. +* [Traefik](https://hub.docker.com/_/traefik) - Reverse proxy manager. + * Alternative: [Nginx Proxy Manager](https://nginxproxymanager.com/) * [WatchTower](https://containrrr.dev/watchtower/) - Automatic container updates. - * My lightweight alternative to this is my own `.sh` script that runs every 4 days that updates all containers on the server. + * My lightweight alternative to this is my own `.sh` script that runs every 4 days that updates all containers on a specific server. * [Paperless](https://docs.paperless-ngx.com/) - Keep those important documents and papers organized with easy searching. ## Misc -* [Homarr](https://homarr.dev/) - A beautiful dashboard with all services and sometimes some nice widgets. +* [Homarr](https://homarr.dev/) - A stylish dashboard with all services and sometimes some nice widgets. * [Beszel](https://beszel.dev/) - Server monitor with some useful alarms. -* [Statping](https://statping.com/) - Application ping. - * Beautier alternative: [Uptime Kuma](https://uptime.kuma.pet/). +* [Uptime Kuma](https://uptime.kuma.pet/) - Status monitoring for applications. * [Gitea](https://gitea.com/) - Homemade GitHub (with Actions!) * [Notepad](https://github.com/pereorga/minimalist-web-notepad) - Homemade dontpad. * [Code Server](https://hub.docker.com/r/linuxserver/code-server/) - VSCode inside of a Docker. * [FileBrowser](https://filebrowser.org/installation#docker/) - Hosting files made easier. -* [Ngnix](https://hub.docker.com/_/nginx/) - Let's all love nginx. -* [WireGuard](https://hub.docker.com/r/linuxserver/wireguard) - Own personal VPN tunnel. +* [nginx](https://hub.docker.com/_/nginx/) - Let's all love nginx. +* [WireGuard](https://hub.docker.com/r/linuxserver/wireguard) - Personal VPN tunnel. * [it-tools](https://hub.docker.com/r/corentinth/it-tools) - Some useful tools that we use every now and then. ## Media (*arr stack) * [Jellyfin](https://hub.docker.com/r/linuxserver/jellyfin/) - Homemade Netflix (I hate Plex). * [Transmission](https://hub.docker.com/r/linuxserver/transmission/) - Torrent client with a simple web interface. - * Alternative [qBitTorrent](https://hub.docker.com/r/linuxserver/qbittorrent) - I'm unlucky to setup it but ok, it's nicer. + * Alternative [qBitTorrent](https://hub.docker.com/r/linuxserver/qbittorrent) - A more advanced web interface. * [Prowlarr](https://hub.docker.com/r/linuxserver/prowlarr/) - Torrent tracker aggregator. * [Sonarr](https://hub.docker.com/r/linuxserver/sonarr/) - TV shows management (Torrent integration). * [Radarr](https://hub.docker.com/r/linuxserver/radarr/) - Movies management (Torrent integration). -* [Lidarr](https://hub.docker.com/r/linuxserver/lidarr/) - Music management (Torrent integration). +* [Lidarr](https://hub.docker.com/r/linuxserver/lidarr/) - Music management (Torrent integration), though I don't use this one. ## Game server * [Minecraft Server](https://hub.docker.com/r/itzg/minecraft-server/) - For that 2 week period every 3 years. \ No newline at end of file