VI
Infrastructure
Live

SPARK Platform — GitOps on K8s

Self-hosted infrastructure shared by the whole SPARK DEV ecosystem: Kubernetes (K8s) + ArgoCD + Postgres/Mongo/Redis/Kafka.

Infrastructure design & operations

Goal

A self-run, low-cost yet production-grade platform for every SPARK DEV product: an app just pushes code to get built, deployed and served over HTTPS — nobody has to SSH into a server to deploy.

Design

  • Kubernetes (K3s) + ArgoCD, GitOps style: the desired state of every app lives in *-gitops repos; ArgoCD (app-of-apps pattern) keeps the cluster in sync with Git.
  • CI → GitOps: GitHub Actions builds the image, pushes it to Docker Hub and commits the new tag to the gitops repo; ArgoCD syncs within minutes. Database migrations run as a PreSync Job before the new version goes live.
  • Shared services: ingress-nginx, PostgreSQL, MongoDB, Redis; Kafka (KRaft), n8n and 9Router for background and AI workloads.
  • Multiple servers connected over a VPN mesh (Headscale), centrally managed by ArgoCD.
  • Automatic TLS with cert-manager + Let's Encrypt; real secrets are created directly in the cluster, never committed.

Results

Core CMS (including the SaaS stores with self-provisioned domains), SPARK AI Gateway, SPARK Finance, OrderManager, Badminton, LLM OCR, Face Tracking and this portfolio all run on the same platform and deploy through a single process.

SPARK Platform — GitOps on K8s — a project by Vũ Xuân Bình