Kubernetes Deployment

Deploy Auto Commerce on Kubernetes for horizontal scaling, high availability, and production-grade infrastructure.

Why Kubernetes?

Kubernetes is recommended when you need:

  • Auto-scaling - Handle traffic spikes automatically
  • High availability - Zero downtime with rolling deployments
  • Resource efficiency - Run multiple services on shared infrastructure
  • Easy rollbacks - Quickly revert to previous versions if issues arise

Deployment Options

Raspberry Pi 5 with k3s

Perfect for development and staging environments. Uses k3s, a lightweight Kubernetes distribution optimized for ARM devices.

  • Cost: ~$60 one-time (hardware only)
  • Best for: Development, staging, learning Kubernetes
  • Guide: Raspberry Pi 5 Setup

Cloud Kubernetes

Production-ready deployment on managed Kubernetes services like DigitalOcean, AWS EKS, or Google GKE.

  • Cost: $80-200/month depending on resources
  • Best for: Production workloads, enterprise deployments
  • Guide: Cloud Kubernetes Setup

Prerequisites

  • Docker installed locally (for building images)
  • kubectl CLI tool
  • Access to a container registry (GitHub Container Registry, Docker Hub)
  • External PostgreSQL database (Neon or Supabase recommended)

Services Overview

Auto Commerce on Kubernetes runs these services:

  • API: Laravel PHP-FPM application (scalable)
  • Nginx: Reverse proxy for PHP-FPM
  • Frontend: Next.js application (scalable)
  • Horizon: Laravel queue worker for background jobs
  • Redis: Caching, sessions, and queues

The database (PostgreSQL) should be external for reliability.

Quick Start

The fastest way to get started is with a Raspberry Pi 5:

# Install k3s on your Pi
curl -sfL https://get.k3s.io | sh -

# Create namespace
sudo k3s kubectl create namespace autocom

# Apply manifests
sudo k3s kubectl apply -f k8s/pi5-k3s/

For detailed setup instructions, see the guides below.

Next Steps