Skip to content

Wife approved HomeOps driven by Kubernetes and GitOps using ArgoCD

Notifications You must be signed in to change notification settings

mrpbennett/home-ops

Repository files navigation

Wife approved HomeOps driven by Kubernetes and GitOps using ArgoCD

Image used with permission from k8s-at-home

talos GitHub Last Commit Home Operations Discord

My Home Operations Repository :octocat:

... managed with ArgoCD, Renovate and GitHub Actions 🤖


💡 Overview

This is a mono repository for my home infrastructure and Kubernetes nodes. I try to adhere to Infrastructure as Code (IaC) and GitOps practices using tools like Kubernetes, ArgoCD, Renovate and GitHub Actions.

I have a HA setup running 3 Dell Optiplex 7060's that consist of Talos control planes that accept workloads.

The purpose here is to learn Kubernetes, while practising GitOps

🌱 Kubernetes

Installation

My Kubernetes enviroment is deployed with Talos. With MetalLB providing LoadBalancer support.

GitOps

ArgoCD watches the cluster in my kubernetes directory (see structure below) and makes the changes to my cluster based on the state of my Git repository. The way ArgoCD works for me here is it will search through kubernetes/registry.... Then deploy apps using the apps of apps pattern.

Cluster Naming

Clusters use short, Dorset-themed names rather than encoding distro or environment info into the directory name. This keeps paths concise and avoids churn if the underlying distro changes.

Cluster Environment Description
portland Production Primary workload cluster
corfe Development Dev / experimentation

Directories

This Git repository contains the following directories under kubernetes. Each cluster lives under kubernetes/clusters/<name>/ with its own apps, registry, and CLUSTER directories.

All Helm deployment values.yaml are contained within the Application under the helm.valuesObject

📁 kubernetes
└── 📁 clusters
    ├── 📁 portland                       # production cluster
    │   ├── argo-root.yaml
    │   ├── 📁 apps                       # application manifests
    │   │   └── 📁 app
    │   │       ├── config-map.yaml
    │   │       ├── ingress.yaml
    │   │       └── stateful-set.yaml
    │   ├── 📁 CLUSTER                    # cluster-wide manifests
    │   │   ├── 📁 cluster-role-bindings
    │   │   ├── 📁 crds
    │   │   ├── 📁 cronjobs
    │   │   ├── 📁 gateway-api
    │   │   ├── 📁 ingress
    │   │   ├── 📁 namespaces
    │   │   └── 📁 testing
    │   └── 📁 registry                   # ArgoCD Application manifests
    │       ├── chartdb.yaml
    │       ├── 📁 helm
    │       └── ...
    └── 📁 corfe                          # development cluster

My argo-root.yaml argocd application checks for changes in ./kubernetes/clusters/portland/registry for new Application manifests. That manifest then checks in the apps directory, then deploys the app like the below:

source:
  repoURL: "https://github.com/mrpbennett/home-ops.git"
  path: kubernetes/clusters/portland/apps/nginx

Tech stack

Name Description
Apache Airflow Workflow Orchestration
ArgoCD GitOps tool built to deploy applications to Kubernetes
Argo Workflows Workflow management to help with CronWorkflows
Cert Manager Certificate management
Docker Registry Private container registry
Envoy Gateway API Gateway
Grafana Observability platform
Helm The package manager for Kubernetes
Kubernetes Container-orchestration system, the backbone of this project
Loki Log aggregation system
ExternalDNS External DNS server configuration
NGINX Kubernetes Ingress Controller
MetalLB Kubernetes load balancer
Prometheus Systems monitoring and alerting toolkit
RustFS Object Storage
SeaweedFS Data Warehouse Object Storage
Trino Fast distributed SQL query engine
Talos OS Talos OS

🌎 DNS

In my cluster there is one instance of ExternalDNS running. This syncs to a Raspberry Pi5 running Pi-hole for syncing local DNS records. This setup allows me to create dns records with valid certification via cert-manager and cloudflares API.


🔧 Hardware

Device Count OS Disk Size Data Disk Size Ram Operating System Purpose
Raspberry Pi5 3 250GB NVMe - 8GB Raspberry Pi ARM64 Microservices
Dell 7060 micro 3 256GB SSD 1TB NVMe 32GB Talos OS Control Planes as workers

⭐ Stargazers

Star History Chart


🤝 Gratitude and Thanks

Thanks to all the people who donate their time to the Home Operations Discord community. Be sure to check out kubesearch.dev for ideas on how to deploy applications or get ideas on what you may deploy.