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