The CloudNativePG logo. It shows the name 'CloudNativePG' as well as a silhouetted elephant next to it.

Migrating my CNPG backups to the Barman Cloud Plugin

Wherein I migrate my CloudNativePG setup to the Barman Cloud Plugin. During my migration from Nomad to Kubernetes, I started using CNPG for my database needs. For more details, have a look at this post. I configured their backup solution right away. It consists of a component which runs in the same Pod as the main Postgres and backs up both, the Write Ahead Log (WAL) and the full database, all while the instance is kept up and running. Those can then be copied to an S3 bucket for long term storage. ...

September 10, 2025 · 9 min · Michael
The HashiCorp Nomad and Kubernetes logos, connected with an arrow pointing from Nomad to Kubernetes

Nomad to k8s, Part 8a: CloudNativePG Disk Size Problems

I recently started migrating my Grafana instance from Nomad to k8s and hit some very weird errors in the CloudNativePG DB after letting it run for a short while. This is an addendum to my previous post on CloudNativePG. The initial issue The first issue came during the first setup of Grafana. A couple of minutes after Grafana started running and writing data to the DB, the two database pods (primary and replica) suddenly stopped working and just threw this error: ...

March 29, 2024 · 5 min · Michael
The HashiCorp Nomad and Kubernetes logos, connected with an arrow pointing from Nomad to Kubernetes

Nomad to k8s, Part 8: Setting up CloudNativePG for Postgres DB Support

Wherein I set up cloud-native-pg to supply Postgres clusters in my k8s cluster. This is part nine of my k8s migration series. PostgreSQL is currently the only DBMS in my Homelab. My initial plan was to just copy and paste the deployment over from my Nomad setup. But then I was pointed towards CloudNativePG, which is an operator for managing Postgres deployments in Kubernetes. But before I go into details on CloudNativePG, a short overview of my current setup in Nomad. I’ve got only a single Postgres instance, hosting several databases for a variety of apps. By far the largest DB at the moment is for my Mastodon instance, with something over 1 GB in size. It runs on a CSI volume provided by my Ceph cluster, located on a couple of SSDs. All apps use this one Postgres instance, and there’s no High Availability or failover. ...

February 29, 2024 · 18 min · Michael