chapter 2 · Building Puchi
  1. 1
  2. 2
  3. 3
  4. 4
page 3 of 4 · read 0%

Jan 2026 · 10 min read · Puchidemy · Build log

Git Push to K3s: Building Puchi's GitOps Deployment Pipeline

Automating zero-touch continuous delivery: GitHub Actions container builds, GHCR registry publishing, and declarative ArgoCD synchronization on a multi-node K3s cluster with zero open firewall ports.

✎ puchidemy/puchi-infra · #Puchidemy #GitOps #ArgoCD #K3s #GitHub Actions #Docker #DevOps

Problem Context

Manual SSH deployments and imperative deployment scripts are error-prone, lack auditability, risk environment drift, and require opening direct SSH/Kubeconfig access into internal cluster networks.

GitOps Deployment Pipeline (ArgoCD & K3s)
1. Git PushGitHub Repo2. GitHub ActionsBuild & Test Containers3. GHCR RegistryVersioned Image Tag4. ArgoCD GitOpsApp of Apps Sync5. 3-Node K3s Cluster (Production-like Self-Hosted Lab)Traefik Ingress · CloudNativePG · NATS JetStream · Zero-Downtime Rolling Updates

Git Push to K3s: Building Puchi's GitOps Deployment Pipeline

Architecture & Design

Puchi establishes a declarative GitOps workflow: When code is pushed to GitHub, GitHub Actions runs tests, builds multi-stage Docker images, and publishes them to GitHub Container Registry (GHCR). A Git commit updates image tags in `puchi-infra`. ArgoCD running inside the K3s cluster detects repository changes and performs an automated rolling update with zero downtime.

Key Technical Decisions

  1. 1ArgoCD App of Apps Pattern: single root manifest manages individual microservice deployments, services, ingress, and configmaps.
  2. 2GitHub Actions Multi-Stage Builds: slim scratch/alpine base images minimize container image size and reduce attack surface.
  3. 3Zero Inbound Firewall Ports: cluster pulls from Git & GHCR internally; user access is routed securely via Cloudflare Tunnels.
  4. 4Sealed Secrets Management: sensitive credentials encrypted with Bitnami SealedSecrets committed safely to public/private Git.

Code & Configuration

ArgoCD Application Definition for Puchi Backend · yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: puchi-backend
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://github.com/puchidemy/puchi-infra.git
    targetRevision: main
    path: k8s/apps/backend
  destination:
    server: https://kubernetes.default.svc
    namespace: puchi
  syncPolicy:
    automated:
      prune: true
      selfHeal: true

Verified repository evidence

  • devops · direct

    Engineered automated GitOps delivery from GitHub commit through GitHub Actions, GHCR, and ArgoCD to a multi-node K3s cluster.

    ↳ Declarative App of Apps pattern syncing frontend PWA and backend microservice deployments automatically upon container image pushes to GHCR.

    puchidemy/puchi-infra ↗

Key Engineering Takeaways

  • Git is the single source of truth for all application deployments and infrastructure state.
  • Rolling back a bad release is as simple as running `git revert` on GitHub.
  • ArgoCD continuously monitors cluster state and automatically heals manual configuration drifts.