main·5006ce4·1m ago

Infrastructure & Deployment

Every service in this portfolio runs in Kubernetes — today on a home server behind Cloudflare Tunnel, and optionally on AWS with EKS and managed services. The home server costs nothing to run. The AWS deployment spins up in 15 minutes with a single script and tears down after to keep costs near zero. Same application code, different infrastructure — swapped via Kustomize overlays.

Current Production

The frontend is a Next.js app on Vercel. API traffic hits Cloudflare's edge network, which routes it through an outbound-only Cloudflare Tunnel to a Debian 13 linux machine running a Minikube Kubernetes cluster. Three namespaces isolate services by concern. Ollama runs natively on the host to access the RTX 3090 GPU directly. No ports are opened, no public IP is exposed, and no port forwarding is configured.

AWS Deployment

The same services deployed on EKS, with self-managed infrastructure replaced by AWS managed services. Terraform provisions the VPC, EKS cluster, RDS, ElastiCache, Amazon MQ, ECR repositories, and the ALB Ingress controller. Kustomize overlays swap connection strings and ingress annotations without changing application code. LLM inference moves from local Ollama to the Groq API.

What Changes Between Environments

ConcernHome ServerAWS
KubernetesMinikube (Docker driver)EKS (managed)
IngressNGINX Ingress ControllerAWS ALB (LB Controller)
PostgreSQLSelf-hosted in K8sRDS
RedisSelf-hosted in K8sElastiCache
RabbitMQSelf-hosted in K8sAmazon MQ
MongoDBSelf-hosted in K8sMongoDB Atlas (free tier)
LLM inferenceOllama (local RTX 3090)Groq API
EmbeddingsOllama nomic-embed-textOpenAI API
DNS / TLSCloudflare TunnelCloudflare DNS + ACM
CI/CD deploySSH → kubectl (Tailscale)GitHub OIDC → EKS

One-Command Deployment

./scripts/aws-up.sh brings the full AWS stack up in ~15-20 minutes:

  1. Bootstrap — creates S3 state bucket and DynamoDB lock table (first run only)
  2. Terraform apply — provisions VPC, EKS, RDS, ElastiCache, Amazon MQ, ECR, and ALB controller
  3. Configure kubectl — connects to the new EKS cluster
  4. Deploy services — applies all Kubernetes manifests using Kustomize AWS overlays
  5. DNS handoff — prints the ALB hostname for Cloudflare DNS configuration

Tear-down is equally simple: ./scripts/aws-down.sh destroys all infrastructure except the S3 state bucket and ECR images (~5 minutes).

Cost

The AWS deployment is designed for spin-up/tear-down — run it for a demo, destroy it after. This keeps monthly costs near zero.

Running (~$5-9/day)

ResourceCost/day
EKS control plane$3.30
2x t3.medium nodes$2.00
RDS db.t3.micro$0.50
ElastiCache cache.t3.micro$0.50
Amazon MQ mq.t3.micro$0.80
NAT Gateway$1.10
ALB$0.80

Torn down (~$0.11/month)

ResourceCost/month
S3 state bucket~$0.01
ECR images~$0.10
MongoDB Atlas (free tier)$0

This cost profile is why the home server remains the primary production deployment.