Skip to content

HomeLab Kubernetes cluster deployed with Talos Linux; automated via Flux, Renovate, and GitHub Actions πŸ€–

License

Notifications You must be signed in to change notification settings

josephpipitone/k8s-gitops

Mars

πŸš€ My Home Operations Repository 🚧

... managed with Flux, Renovate, and GitHub Actions πŸ€–

DiscordΒ Β  TalosΒ Β  KubernetesΒ Β  FluxΒ Β  Renovate

Home-InternetΒ Β  Status-PageΒ Β 

Age-DaysΒ Β  Uptime-DaysΒ Β  Node-CountΒ Β  Pod-CountΒ Β  CPU-UsageΒ Β  Memory-UsageΒ Β  Alerts


πŸ’‘ Overview

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


🌱 Kubernetes

My Kubernetes cluster is deployed with Talos. This is a semi-hyper-converged cluster, workloads and block storage are sharing the same available resources on my nodes while I have a separate server with ZFS for NFS/SMB shares, bulk file storage and backups.

There is a template over at onedr0p/cluster-template if you want to try and follow along with some of the practices I use here.

Core Components

  • actions-runner-controller: Self-hosted GitHub runners for CI/CD workflows.
  • cert-manager: Automated SSL certificate management and provisioning.
  • cilium: High-performance container networking powered by eBPF.
  • cloudflared: Secure tunnel providing Cloudflare-protected access to cluster services.
  • envoy-gateway: Modern ingress controller for cluster traffic management.
  • external-dns: Automated DNS record synchronization for ingress resources.
  • external-secrets: Kubernetes secrets management integrated with 1Password Connect.
  • multus: Multi-homed pod networking for advanced network configurations.
  • rook: Cloud-native distributed storage orchestrator for persistent storage.
  • spegel: Stateless cluster-local OCI registry mirror for improved performance.
  • volsync: Advanced backup and recovery solution for persistent volume claims.

GitOps

Flux watches my kubernetes folder (see Directories below) and makes the changes to my clusters based on the state of my Git repository.

The way Flux works for me here is it will recursively search the kubernetes/apps folder until it finds the most top level kustomization.yaml per directory and then apply all the resources listed in it. That aforementioned kustomization.yaml will generally only have a namespace resource and one or many Flux kustomizations (ks.yaml). Under the control of those Flux kustomizations there will be a HelmRelease or other resources related to the application which will be applied.

Renovate monitors my entire repository for dependency updates, automatically creating a PR when updates are found. When some PRs are merged Flux applies the changes to my cluster.

Directories

This Git repository contains the following directories under kubernetes.

πŸ“ kubernetes      # Kubernetes cluster defined as code
β”œβ”€πŸ“ apps          # Apps deployed into my cluster grouped by namespace (see below)
β”œβ”€πŸ“ components    # Re-usable kustomize components
β””β”€πŸ“ flux          # Flux system configuration

🌎 DNS

I run two instances of ExternalDNS to handle DNS automation:

This is achieved by defining routes with two specific gateways: envoy-internal for private DNS and envoy-external for public DNS. Each ExternalDNS instance watches for routes using its assigned gateway and syncs the appropriate DNS records to the corresponding platform.


βš™ Hardware

Click to see my rack rack-front rack-rear

Device Count OS Disk Size Data Disk Size Ram Operating System Purpose
MS-01 (i9-12900H) 3 1xTB m2 nvme 1xTB m2 nvme 64GB Talos Kubernetes
Dell R730XD 1 - Random drive sizes 128GB UnRAID OS NFS
UniFi UNAS Pro 1 - 7x16TB HDD 8GB UniFi OS Backup of backups
UniFi UCG Fiber 1 - 1x2TB m2 nvme - UniFi OS Router & NVR
UniFi USW Pro Max 24 PoE 1 - - - UniFi OS 1/2.5Gb PoE Switch
UniFi USW Pro XG 10 PoE 1 - - - UniFi OS 10Gb PoE Switch
GMKtec M5 Plus 1 1xTB m2 nvme 1xTB m2 nvme 64GB Proxmox Various

πŸ™ Gratitude and Thanks

Many thanks to my friend @onedrop and all the fantastic 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.


🚧 Changelog

See the latest release notes.


βš– License

See LICENSE.

About

HomeLab Kubernetes cluster deployed with Talos Linux; automated via Flux, Renovate, and GitHub Actions πŸ€–

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 3

  •  
  •  
  •