Below you will find pages that utilize the taxonomy term “Kubernetes”
openGym on Kubernetes
For a while I have been looking for a good self-hosted solution for recording my gym sessions. I have a good solution for tracking my cardio sessions (cycling and running mainly) in Endurain, but never for strength training. I have tried a few:
- wger - a good solution, but the UI is a bit dated and it is also geared towards managing a gym rather than a single user.
- Wingfit - also good, but I just did not click with it. Shame, because the developer is from Brittany, which is my adopted home.
- A multitude of different open source Android apps. These all had UX issues and no syncing, so kind of sucked for me.
As a result, I stayed on Strong for much longer than I would have liked.
N8n with Ollama on Kubernetes
Once again I have a new tool I have been playing with, once again AI related. One of the tools I have been using is n8n which is a workflow automation platform. It enables us to integrate multiple applications and services through a visual interface. While it is very much an enterprise solution, it is FLOSS and we can deploy it at home, albeit with some caveats and/or workarounds.
One of the really powerful parts of N8n is that we can integrate with various AI platforms, including all the usual suspects: Claude, ChatGPT, etc. Of course I want to keep things local, which N8n caters for with Ollama.
My initial plan is to do react to an alert from Prometheus and give myself some advise about what to do. The plan is pretty simple and adds to my existing Alerts through Telegram:
Alertmanager
├─► Telegram (existing)
└─► n8n webhook
└─ Python Code (build prompt)
└─ HTTP Request → Ollama
└─ Telegram (post analysis)
- Alertmanager fires a webhook to n8n alongside the existing Telegram notification
- n8n builds a prompt from the alert payload and sends it to Ollama
- Ollama analyses the alert and suggests a fix
- n8n posts the analysis back to Telegram
So let’s start by getting it installed
Installing n8n on Kubernetes
There is no official Helm chart, but the community-maintained chart is excellent and well maintained. To get started we need:
- Redis which we will install with Helm
- PostgreSQL for which we will use Cloudnative-PG
- Some storage (I will use Longhorn as usual)
- n8n itself
Dependencies first
Before we can do anything else, let’s get Redis and PostgreSQL setup. The simplest is Redis using the Cloud Pirates Helm Chart:
helm --namespace n8n install n8n-redis \
oci://registry-1.docker.io/cloudpirates/redis \
-f redis-values.yaml
The contents of redis-values.yaml is very simple:
architecture: standalone
master:
persistence:
enabled: true
auth:
enabled: true
That will create a secret (n8n-redis) to we use later.
Alertmanager Telegram integration in Kubernetes
Some more Prometheus content now, this time I will share how I do my alerting. I want to to receive alerts from my homelab, but I do not care about them too much. If something goes wrong at 2am, I really could not careless. In fact, there is no reason why I would want to be disturbed by them under any circumstances.
To that end, the whole point of my homelab is that I can use the same techniques I would use in production. To that end, I do want to set up alerts, I just want to keep them as non-intrusive as possible. A good solution for my alerts then is Telegram, as I can have them sent to a channel that I mute. Now I can see them, but I am never actually disturbed by them.
Local Thanos on Kubernetes
I run Kubernetes in my homelab and use the (now classic) Prometheus/Grafana stack for monitoring everything. In my experience, the thing that Prometheus does not do well is long-term storage. Prometheus’ own database is fine for a few days storage, but performance and reliability quickly degrade. There are quite a few solutions to this problem, but I choose to use Thanos, partly because Kube Prometheus Stack has very good support for it.
New Home Lab
Where better to start than how my lab is working.
My home lab is not one that has really been planned, rather I acquire/buy things as the opportunity arises. It really has 2 things:
- NAS
- Kubernetes