THE QUEST BEGINS

I've always wanted to run my own Kubernetes cluster at home, not just for learning but to actually host real services. This project is about building a production-grade K8s cluster using Raspberry Pi nodes - because why not make it challenging and fun?

═══════════════════════════════════════

WHAT I'M BUILDING

A multi-node Kubernetes cluster with:

  • 3x Raspberry Pi 4 (8GB) as worker nodes
  • 1x Raspberry Pi 4 (4GB) as control plane
  • GitOps workflow using Flux CD
  • Full observability stack (Prometheus, Grafana, Loki)
  • Automated certificate management with cert-manager
  • Ingress controller for external access
  • Persistent storage using Longhorn
═══════════════════════════════════════

THE CHALLENGES

Challenge #1: ARM Architecture Compatibility

Running K8s on ARM wasn't as smooth as I thought. Many container images don't support ARM64 out of the box. I had to either find multi-arch images or build my own.

Solution: Created a custom Docker registry and started building ARM-compatible images. Also learned to use buildx for multi-platform builds. This actually taught me a lot about container internals!

Challenge #2: Power Management

Four Raspberry Pis running 24/7 meant dealing with power supply issues. The cheap USB power supplies I initially used couldn't handle the load, causing random reboots.

Solution: Invested in a proper PoE (Power over Ethernet) HAT setup. Now power and networking come through a single cable per node. Much cleaner and more reliable!

Challenge #3: Storage Persistence

SD cards are not ideal for production workloads. I experienced corruption and slow I/O that made databases nearly unusable.

Solution: Boot from SD cards but use USB 3.0 SSDs for all persistent storage. Implemented Longhorn for distributed storage across nodes. Performance improved dramatically!

═══════════════════════════════════════

KEY LEARNINGS

  • GitOps is amazing: Having all configs in Git and auto-synced to the cluster is pure magic. I can roll back any change with a git revert.
  • Observability matters: You can't manage what you can't see. Setting up Prometheus and Grafana early saved me countless hours of debugging.
  • Start small, scale smart: I tried to do everything at once initially and got overwhelmed. Breaking it into smaller milestones made it manageable.
  • Documentation as you go: Future me is grateful that I documented decisions and configurations. I've already forgotten half the things I learned!
═══════════════════════════════════════

WHAT'S NEXT

Current roadmap includes:

  • Implementing backup and disaster recovery
  • Adding more services (Home Assistant, Nextcloud, etc.)
  • Experimenting with service mesh (Istio or Linkerd)
  • Setting up CI/CD pipelines for my other projects
  • Maybe adding more nodes because... why not?
LINES OF YAML: TOO MANY TO COUNT
COFFEE CONSUMED: LEGENDARY
FUN LEVEL: MAXIMUM
═══════════════════════════════════════

TECH STACK

KUBERNETES RASPBERRY PI FLUX CD GITOPS PROMETHEUS GRAFANA LONGHORN CERT-MANAGER

> This project taught me that sometimes the journey of building something is more valuable than the destination. Every challenge was an opportunity to learn something new and have fun doing it.

<< BACK TO PROJECTS