cbirkenbeul / homelab

IaaC defined Homelab
Apache License 2.0
16 stars 2 forks source link
homelab homelab-setup iaac k8s-at-home proxmox
### My Home Operations repository :octocat: _... managed with Flux, Renovate and GitHub Actions_ 🤖
[![Discord](https://img.shields.io/discord/673534664354430999?style=for-the-badge&label&logo=discord&logoColor=white&color=blue)](https://discord.gg/k8s-at-home) [![Kubernetes](https://img.shields.io/endpoint?url=https%3A%2F%2Fkromgo.casalani.de%2Fquery%3Fformat%3Dendpoint%26metric%3Dkubernetes_version&style=for-the-badge&logo=kubernetes&logoColor=white&color=blue&label=%20)](https://www.talos.dev/) [![GitHub last commit](https://img.shields.io/github/last-commit/cbirkenbeul/homelab?color=purple&style=for-the-badge)](https://github.com/cbirkenbeul/homelab/commits/main 'Commit History') [![GitHub stars](https://img.shields.io/github/stars/cbirkenbeul/homelab?color=green&style=for-the-badge)](https://github.com/cbirkenbeul/homelab/stargazers 'This repo star count')
[![Age-Days](https://img.shields.io/endpoint?url=https%3A%2F%2Fkromgo.casalani.de%2Fquery%3Fformat%3Dendpoint%26metric%3Dcluster_age_days&style=flat-square&label=Age)](https://github.com/kashalls/kromgo/)   [![Uptime-Days](https://img.shields.io/endpoint?url=https%3A%2F%2Fkromgo.casalani.de%2Fquery%3Fformat%3Dendpoint%26metric%3Dcluster_uptime_days&style=flat-square&label=Uptime)](https://github.com/kashalls/kromgo/)   [![Node-Count](https://img.shields.io/endpoint?url=https%3A%2F%2Fkromgo.casalani.de%2Fquery%3Fformat%3Dendpoint%26metric%3Dcluster_node_count&style=flat-square&label=Nodes)](https://github.com/kashalls/kromgo/)   [![Pod-Count](https://img.shields.io/endpoint?url=https%3A%2F%2Fkromgo.casalani.de%2Fquery%3Fformat%3Dendpoint%26metric%3Dcluster_pod_count&style=flat-square&label=Pods)](https://github.com/kashalls/kromgo/)   [![CPU-Usage](https://img.shields.io/endpoint?url=https%3A%2F%2Fkromgo.casalani.de%2Fquery%3Fformat%3Dendpoint%26metric%3Dcluster_cpu_usage&style=flat-square&label=CPU)](https://github.com/kashalls/kromgo/)   [![Memory-Usage](https://img.shields.io/endpoint?url=https%3A%2F%2Fkromgo.casalani.de%2Fquery%3Fformat%3Dendpoint%26metric%3Dcluster_memory_usage&style=flat-square&label=Memory)](https://github.com/kashalls/kromgo/)  

k8s clusters backed by Flux v2

Kubernetes clusters using the GitOps tool Flux.
The Git repository is the driving the state of the Kubernetes clusters.
The awesome Flux SOPS integration is used to encrypt secrets with gpg.

:computer:  Software

The following apps are installed on the clusters.

Software Purpose
Flux2 GitOps Tool managing the cluster
NGINX Ingress Controller Cluster Ingress controller
Rook-Ceph Cloud native distributed block storage for Kubernetes
MetalLB Bare metal LoadBalancer
Cert-Manager Letsencrypt certificates with Cloudflare DNS
ExternalDNS Configure Cloudflare DNS Servers
kube-vip Virtual IP Load-Balancer for Control Plane High Availability
Kube-Prometheus Stack Prometheus & Exporters to monitor the cluster
Grafana Monitoring & Logging Dashboard
Alertmanager Monitoring Alerts
Grafana Loki Log aggregation system
System Upgrade Controller Automated k3s upgrades
Descheduler Evicts pods to optimize scheduling
Kubernetes Metrics Server Source of container resource metrics for Kubernetes

☁️ Cloud Dependencies

While most of my infrastructure and workloads are self-hosted I do rely upon the cloud for certain key parts of my setup. This saves me from having to worry about two things. (1) Dealing with chicken/egg scenarios and (2) services I critically need whether my cluster is online or not.

Service Use Cost
1Password Secrets with External Secrets ~€80/yr
NetCaup Domain ~€5/yr
GitHub Hosting this repository and continuous integration/deployments Free
Total: ~€7/mo

🔧 Hardware

Main Kubernetes Cluster

Name Device CPU OS Disk Data Disk RAM OS Purpose
kube-01 Dell 5090 i5-10500T 256 GB NVME 128 GB SSD 32 GB Debian 12 k8s control-plane, worker
kube-02 Dell 5090 i5-10500T 256 GB NVME 128 GB SSD 32 GB Debian 12 k8s control-plane, worker
kube-03 Dell 5090 i5-10500T 256 GB NVME 128 GB SSD 32 GB Debian 12 k8s control-plane, worker

Networking/UPS Hardware

Device Purpose
Lenovo M920q (opnsense) Network - Router
MikroTik CRS328-24P-4S+ Network - Switch
Cyberpower USV OR600ERM UPS

:robot:  Automation

Renovate Bot makes sure the components are never outdated.

It creates PullRequests when Helm charts or Docker images have newer versions available and even keeps Flux and k3s up-to-date.

:handshake:  Thanks

Big shout out to k8s@home and everyone from awesome-home-kubernetes for the inspiration :heart: