Building a Multi-Blogging Platform with WordPress Multisite on Kubernetes


The idea is simple. A blogging platform where anyone can register and get their own blog with a preinstalled website and a personal subdomain. Just log in and start publishing.

I will use WordPress Multisite. WordPress is simple, well-known, and built on a familiar tech stack: WordPress, MySQL, and a reverse proxy. That’s it.

Is Kubernetes the best choice for this setup? The honest answer: no. It’s too complex. Too many things can go wrong.

Can it scale? So-so. As long as the database can handle the requests, it should work.

So why am I doing this? Mostly for the fun of it. Many things could be done better. Credentials could be stored more securely, the database architecture could be improved, resources could be provisioned more efficiently, and scaling could be faster.

This article is a good reference for how I usually start my projects and gradually improve them. Along the way, I’ll cover some core Kubernetes concepts like Deployments, exposing applications to the internet, and building both stateless and stateful applications.

Continue reading “Building a Multi-Blogging Platform with WordPress Multisite on Kubernetes” →

One Public IPv4, Many Kubernetes Apps

I have an on-premise Kubernetes cluster with persistent storage. Now it’s time to find a way to expose my applications to the internet.

I only have a single public IPv4 address and a /24 private subnet behind NAT, managed by OPNsense. This means I’ll need a few creative (and slightly dirty) hacks to make everything work.

I’m starting to realize how much the cloud has spoiled me. Without unlimited load balancers and public IP addresses, things quickly become a bit more complex.

For this setup, my main tools will be MetalLB and NGINX Ingress. NGINX Ingress will be retired soon, and I plan to replace it in the near future. However, for a home lab environment it will work just fine for now.

This setup is far from perfect, so don’t try this in real production.

Continue reading “One Public IPv4, Many Kubernetes Apps” →

Persistent volume for on premise kubernetes cluster with NFS

Data will be stored on Debian VM with NFS. Provisioning persistent volumes will be automated like in the cloud. Every PVC will have his own sub directory on NFS. I will use Kubernetes NFS Subdir External Provisioner and Helm. Helm is installed on jumpbox with access to the existing cluster. Setup is for home lab, special security for NFS server will not be implemented.

Continue reading “Persistent volume for on premise kubernetes cluster with NFS” →

PHPEnv: Run Different PHP Versions Side by Side on Ubuntu

Running multiple PHP versions on the same server or development machine is never straightforward. One distro upgrade can break packages and turn your environment into a mess. For example, Ubuntu 20.04 ships with PHP 7.4, 22.04 comes with PHP 8.1, and 24.04 will use PHP 8.3. But what if you have projects that require both old and new PHP versions at the same time? That’s where PHPenv comes in. It’s an excellent tool for local development—and even for UAT servers.

To demonstrate how to use different PHP versions side by side, I’ll first install WordPress on Ubuntu 20.04 using Ansible. After that, I’ll set up PHPenv and switch to PHP 8.2.5 using pfm. The first part focuses on WordPress with Ansible, but if you want to skip straight to the PHPenv setup, feel free to jump ahead.

Continue reading “PHPEnv: Run Different PHP Versions Side by Side on Ubuntu” →