Skip to content

rtrox/home-ops

Repository files navigation

Home Operations

Infrastructure as Code for my home Kubernetes clusters

Talos Kubernetes Flux Renovate

Pre-commit GitHub Workflow Status


Overview

This repository contains the Infrastructure as Code (IaC) for my home Kubernetes clusters, managed using GitOps principles with Flux. The infrastructure runs on Talos Linux, a modern OS designed specifically for Kubernetes.


Kubernetes

Clusters

I run two Kubernetes clusters:

  • Chongus (Primary) - Dell R730 servers with NVIDIA GPUs
  • Bitty (Secondary) - Intel NUC cluster

Core Components

  • cilium - eBPF-based CNI with native routing and Gateway API support
  • cert-manager - Automated TLS certificate management
  • external-dns - Automatic DNS management via Cloudflare
  • external-secrets - Kubernetes External Secrets Operator integrated with Doppler
  • envoy-gateway - Gateway API implementation for HTTP routing
  • rook-ceph - Distributed storage with Ceph
  • volsync - PVC backup and restore to B2 and MinIO
  • cloudnative-pg - PostgreSQL operator with HA and backup

GitOps

Flux watches the cluster-apps/ directory and reconciles the cluster state automatically. The workflow:

graph LR
    A[Git Push] --> B[Flux Detects Change]
    B --> C[Reconcile Kustomization]
    C --> D[Deploy HelmRelease]
    D --> E[Update Cluster State]
Loading

Directory Structure

This repository follows a structured GitOps layout:

πŸ“ cluster-apps/           # Application definitions (Flux source)
β”œβ”€β”€ πŸ“ base/              # Shared applications across clusters
β”œβ”€β”€ πŸ“ chongus/           # Chongus cluster applications (NEW PATTERN)
β”‚   └── πŸ“ [namespace]/
β”‚       └── πŸ“ [app]/
β”‚           β”œβ”€β”€ πŸ“ app/   # HelmRelease + configs
β”‚           └── ks.yaml   # Flux Kustomization
β”œβ”€β”€ πŸ“ bitty/             # Bitty cluster (deprecated pattern)
└── πŸ“ components/        # Reusable Kustomize components

πŸ“ clusters/              # Cluster bootstrap configurations
β”œβ”€β”€ πŸ“ chongus/
β”‚   β”œβ”€β”€ πŸ“ bootstrap/     # Helmfile-based bootstrap
β”‚   β”œβ”€β”€ πŸ“ flux/          # Flux Kustomizations
β”‚   └── πŸ“ talos/         # Talos configuration
└── πŸ“ bitty/

πŸ“ .taskfiles/            # Operational automation

Workflow

Network Architecture

Container Networking:

  • Cilium CNI with eBPF
  • Native routing mode (10.244.0.0/16)
  • KubeProxy replacement enabled
  • Hubble for observability

Gateway API:

  • envoy-external (172.22.12.2) - Internet-accessible via Cloudflare Tunnel
  • envoy-internal (172.22.12.1) - Local network only (Tailscale)

Load Balancing:

  • Cilium LBIPAM (172.22.12.0/24)
  • Maglev algorithm with DSR mode

DNS:

  • External-DNS with Cloudflare provider
  • Automatic record creation from Gateway API HTTPRoutes

Certificates:

  • Let's Encrypt via cert-manager
  • Automatic TLS for all HTTPRoutes

☁️ Cloud Dependencies

While most infrastructure runs on-premises, some cloud services are used:

Service Purpose Cost
Cloudflare DNS, Tunnel, CDN ~$0/month (free tier)
Doppler Secret management ~$0/month (free tier)
Backblaze B2 Backup storage ~$5/month
GitHub Git hosting, CI/CD ~$0/month (free tier)

πŸ”§ Hardware

Chongus Cluster (Primary)

Device CPU RAM Storage Purpose
Dell R730 x3 Intel Xeon 256GB+ 2x Samsung 870 EVO 2TB Kubernetes nodes with NVIDIA GPUs

Storage:

  • Rook-Ceph: 6x 2TB SSDs (2 per node)
  • Storage Class: ceph-block (default)
  • Replication: 3 replicas

Bitty Cluster (Secondary)

Device CPU RAM Storage Purpose
Intel NUC x3 Intel i5/i7 32GB+ NVMe Kubernetes nodes with QuickSync
  • Rook-Ceph: 3x 512GB SSDs (1 per node)
  • Storage Class: ceph-block (default)
  • Replication: 3 replicas

Supporting Infrastructure

Device Purpose
True NAS NFS storage for media and shared files
Raspberry Pi Ansible-managed DNS, Tailscale, and mDNS repeater

Getting Started

Prerequisites

Tools are managed via mise:

# Install mise
curl https://mise.run | sh

# Install all tools
mise install

Bootstrap a New Cluster

# 1. Generate Talos configuration
task talos:generate-clusterconfig

# 2. Apply to nodes
task talos:apply-clusterconfig

# 3. Bootstrap cluster
task k8s-bootstrap:talos-cluster

# 4. Deploy core apps and CRDs
task k8s-bootstrap:apps

Flux will then automatically sync applications from cluster-apps/.

Common Operations

# Validate Flux resources locally
task flux:validate

# Force reconcile an application
flux reconcile helmrelease [app-name] -n [namespace]

# Check cluster status
kubectl get kustomization -A
kubectl get helmrelease -A

# View Ceph storage health
kubectl -n rook-ceph exec -it deploy/rook-ceph-tools -- ceph status

Documentation

For detailed information about the repository structure, patterns, and best practices, see:


Acknowledgments

This repository is inspired by the k8s-at-home community and draws patterns from:

Special thanks to the maintainers of all the open-source projects used in this cluster.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •