✎ Key Insights in 30 Seconds
Field note: Setting up a resilient self-hosted lab: 3 control-plane/worker nodes, CloudNativePG HA PostgreSQL, NATS JetStream, Valkey, Traefik, Cloudflare Tunnel, and ArgoCD GitOps.
Problem Context
Testing distributed microservice patterns such as failover, rolling rollouts, outbox consumers, and ingress security on managed public Kubernetes can become expensive for independent research and development.
Running a Production-Like Platform on a Three-Node K3s Cluster
Architecture & Design
We constructed a production-like 3-node bare-metal K3s cluster (nodes 192.168.100.201-203) using embedded etcd for high availability. Ingress traffic enters via Cloudflare Tunnels (eliminating public IP exposure) into Traefik Ingress. State is managed by CloudNativePG (HA PostgreSQL with automatic leader election) and Valkey. Workload delivery is fully automated via declarative ArgoCD GitOps syncing manifests directly from GitHub.
Key Technical Decisions
- 1Embedded etcd High-Availability: 3 server nodes participate in quorum, allowing any single node to fail without cluster downtime.
- 2CloudNativePG PostgreSQL Operator: automated asynchronous streaming replication, continuous WAL archiving, and sub-10s failover.
- 3Cloudflare Tunnel Zero-Trust Ingress: all cluster endpoints are published securely without port forwarding or exposing router firewalls.
- 4ArgoCD App of Apps Pattern: single root GitOps application orchestrating infrastructure operators and microservice Helm releases.
Code & Configuration
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: arda-postgres-ha
namespace: database
spec:
instances: 3
primaryUpdateStrategy: unsupervised
storage:
size: 20Gi
storageClass: local-path
postgresql:
parameters:
shared_buffers: "256MB"
max_connections: "200"Verified repository evidence
infrastructure · direct
Orchestrated a 3-node bare-metal K3s cluster running CloudNativePG HA PostgreSQL, Valkey, Traefik, and Cloudflare Tunnels managed declaratively via ArgoCD.
↳ 3 control-plane/worker nodes with CloudNativePG PostgreSQL operator, Valkey caching, Traefik ingress controller, and Cloudflare Tunnel zero-trust exposure.
arda-labs/arda-infra ↗infrastructure · direct
Built and operate a Proxmox-based K3s Homelab on one ThinkCentre host with three Ubuntu 26 VMs, Longhorn storage, Traefik ingress, and automated local CI/CD pipelines.
↳ One ThinkCentre host with Intel Xeon E-2286M (8 cores / 16 threads) and 32 GB RAM, running Proxmox with three Ubuntu 26 VMs. The guests run K3s, Longhorn storage, Traefik Ingress Controller, and automated container deployment pipelines.
Self-Hosted Infrastructure Lab ↗
Key Engineering Takeaways
- A 3-node K3s cluster provides identical API semantics to full Kubernetes while consuming less than 512MB RAM per control-plane node.
- CloudNativePG delivers enterprise-grade database replication and automated failover out of the box.
- Declarative GitOps guarantees that the entire infrastructure state is version-controlled and reproducible from scratch.