Kubernetes GitOps Lab : pve-1

Kubernetes GitOps Lab

A complete delivery platform on my main Proxmox host: a two-node k3s cluster, Gitea for code, CI and images, and Argo CD keeping the cluster in sync with Git.

It started as a place to learn Kubernetes, GitOps and infrastructure as code by building, breaking and rebuilding. It now runs a real workload: DataBI, my BI platform, moved here from Docker Compose and is served to the public at bi.labjom.com.

The lab was built on a second host, pve-2, which is not on around the clock. In November 2026 I streamed the whole cluster, Gitea and the workstation to pve-1 with the same IP and MAC addresses, so certificates, registry URLs and Argo CD kept working with no reconfiguration.

The pipeline

Gitea push, Actions build and Trivy scan, registry, Argo CD sync of DataBI to the k3s cluster
  1. A push to DataBI's working branch on Gitea starts a Gitea Actions workflow.
  2. The runner builds and tests the .NET API, then builds the API and web images.
  3. Trivy scans both images and stops the release on any fixable critical vulnerability. SonarQube scans the code in a parallel job.
  4. The images go to Gitea's registry, tagged with the commit.
  5. The workflow commits the new tags to the Kubernetes manifests in the same repository.
  6. Argo CD sees the commit and rolls the new version out to k3s, then reports it healthy.

What runs on the cluster

DataBI lives in its own databi namespace:

  • API: the ASP.NET Core service, with a persistent volume for uploaded files and health probes that hold traffic back until it is ready.
  • Web: two replicas of Nginx serving the Angular app and passing /api to the API.
  • Traffic: k3s's built-in load balancer publishes the web service, and cloudflared carries bi.labjom.com to it with no open inbound ports.
  • Data: the PostgreSQL database stays on the Debian app VM, so the cluster can be rebuilt without touching it. Secrets come from a Kubernetes Secret, never from Git.

The lab's guests on pve-1

GuestTypeRole
k3s-cp1VM 201Control plane: Argo CD, Traefik, cert-manager, Headlamp, cloudflared
k3s-w1VM 202Worker: DataBI and other application workloads
giteaLXC 300Git, Actions CI and container registry
workstationVM 105kubectl, Helm, k9s, OpenTofu, Ansible, Trivy, CI runner
debian13-cloudinitTemplate 9000Base image that new VMs are cloned from

Lessons so far

Ballooning and Kubernetes don't mix

On the old 8 GB host, Proxmox ballooning reclaimed memory from the k3s nodes under load and starved the cluster. The Kubernetes VMs now get fixed memory (4 GB each on pve-1).

Make rollback cheap

Every guest has a baseline snapshot, taken again after the move to pve-1. Experiments start from a known-good state, and a broken cluster is a few minutes from clean.

Debugging the network, not the server

SSH sessions froze seconds after login. The cause was the Wi-Fi access point dropping packets that OpenSSH 10 marks with DSCP. IPQoS none fixed it, and it is now the first thing I check.

Next

  • OpenTofu with the Proxmox provider to create the VMs
  • Ansible to configure them
  • A three-node kubeadm cluster next to k3s
  • Argo CD notifications into the same Telegram channel as the monitoring alerts
  • Secrets management and admission policy
  • A second SSD for storage and backups