Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kashalls/home-cluster

๐Ÿ–ณ In-house kubernetes cluster built with k3s and managed by flux (gitops).
https://github.com/kashalls/home-cluster

ansible home-assistant home-automation k3s k8s-at-home kubernetes node-red renovate

Last synced: 2 months ago
JSON representation

๐Ÿ–ณ In-house kubernetes cluster built with k3s and managed by flux (gitops).

Awesome Lists containing this project

README

        

# Kashall's Home Operations

[![Discord](https://img.shields.io/discord/673534664354430999?style=for-the-badge&label&logo=discord&logoColor=white&color=blue)](https://discord.gg/home-operations)ย ย 
[![Talos](https://img.shields.io/endpoint?url=https%3A%2F%2Fkromgo.ok8.sh%2Fquery%3Fformat%3Dendpoint%26metric%3Dtalos_version&style=for-the-badge&logo=talos&logoColor=white&color=blue&label=%20)](https://www.talos.dev/)ย ย 
[![Kubernetes](https://img.shields.io/endpoint?url=https%3A%2F%2Fkromgo.ok8.sh%2Fquery%3Fformat%3Dendpoint%26metric%3Dkubernetes_version&style=for-the-badge&logo=kubernetes&logoColor=white&color=blue&label=%20)](https://www.talos.dev/)ย ย 
[![Renovate](https://img.shields.io/github/actions/workflow/status/kashalls/home-cluster/renovate.yaml?branch=main&label=&logo=renovatebot&style=for-the-badge&color=blue)](https://github.com/kashalls/home-cluster/actions/workflows/renovate.yaml)

[![Age-Days](https://img.shields.io/endpoint?url=https%3A%2F%2Fkromgo.ok8.sh%2Fquery%3Fmetric%3Dcluster_age_days&style=flat-squaree&label=Age)](https://github.com/kashalls/kromgo/)ย ย ย 
[![Uptime-Days](https://img.shields.io/endpoint?url=https%3A%2F%2Fkromgo.ok8.sh%2Fquery%3Fmetric%3Dcluster_uptime_days&style=flat-square&label=Uptime)](https://github.com/kashalls/kromgo/)ย ย ย 
[![Active-Alerts](https://img.shields.io/endpoint?url=https%3A%2F%2Fkromgo.ok8.sh%2Fquery%3Fmetric%3Dprometheus_active_alerts&style=flat-square&label=Firing%20Alerts)](https://github.com/kashalls/kromgo/)ย ย ย 
[![Node-Count](https://img.shields.io/endpoint?url=https%3A%2F%2Fkromgo.ok8.sh%2Fquery%3Fmetric%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.ok8.sh%2Fquery%3Fmetric%3Dcluster_pods_running&style=flat-square&label=Pods&color=green)](https://github.com/kashalls/kromgo/)ย ย ย 
[![CPU-Usage](https://img.shields.io/endpoint?url=https%3A%2F%2Fkromgo.ok8.sh%2Fquery%3Fmetric%3Dcluster_cpu_usage&style=flat-square&label=CPU)](https://github.com/kashalls/kromgo/)ย ย ย 
[![Power-Usage](https://img.shields.io/endpoint?url=https%3A%2F%2Fkromgo.ok8.sh%2Fquery%3Fmetric%3Dcluster_power_usage&style=flat-square&label=Power)](https://github.com/kashalls/kromgo/)

## What is this?

This is the repository I use to version control my kubernetes clusters I deploy and maintain at home. I currently use [Talos](https://www.talos.dev/) to provide a secure, minimal and immutable environment for Kubernetes. Previous iterations of this repository relied on Debian-based Operating Systems which can lead unwanted changes in the base system.

## How did you do this?

Thanks to [onedr0p](https://github.com/onedr0p), there is the [cluster template](https://github.com/onedr0p/flux-cluster-template) that allows you to easily get started with your own kubernetes cluster at home. You don't need to have multiple computers or a fancy setup to get one working.

If you're interested, you can also join the community [Discord](https://discord.com): [Home Operations](https://discord.gg/home-operations). Several people are involved daily and it makes for some interesting conversations.

### Directory Helper

This repository uses the following layout for [Kubernetes](./kubernetes/).

```sh
๐Ÿ“ kubernetes
โ””โ”€โ”€ ๐Ÿ“ {cluster}
โ”œโ”€โ”€ ๐Ÿ“ apps # Per-cluster application-specific configurations.
โ”œโ”€โ”€ ๐Ÿ“ bootstrap # Flux & Talos configurations for setting up the cluster.
โ”œโ”€โ”€ ๐Ÿ“ flux # Flux configuration, application repositories and more.
โ”œโ”€โ”€ ๐Ÿ“ kubeconfig # Kubernetes Certificate
โ””โ”€โ”€ ๐Ÿ“ talosconfig # Talos Certificate
```

## โ˜๏ธ 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](https://1password.com/) | Secrets with [External Secrets](https://external-secrets.io/) | ~$55/yr |
| [Cloudflare](https://www.cloudflare.com/) | Domains, Workers, Pages, and R2 | ~$30/yr |
| [GCP](https://cloud.google.com/) | Voice interactions with Home Assistant over Google Assistant | Free |
| [GitHub](https://github.com/) | Hosting this repository and continuous integration/deployments | Free |
| [Let's Encrypt](https://letsencrypt.org/) | Issuing SSL Certificates with Cert Manager | Free |
| [Migadu](https://migadu.com/) | Email Hosting | ~$20/yr |
| [Pulumi Cloud](https://app.pulumi.com/) | Resource state management | Free |
| [Pushover](https://pushover.net/) | Kubernetes Alerts and application notifications | Free |
| [UniFi Site Manager](https://unifi.ui.com) | UniFi External Access Management | Free |
| | | Total: ~$10/mo |
---

## ๐Ÿ’ป Networking

Click to see a high-level network diagram

networking

### ๐ŸŒ DNS

UniFi released a new feature update with UniFi routers that allow you to create custom dns records to be served to the whole network. I wrote[External DNS Unifi Webhook](https://github.com/kashalls/external-dns-unifi-webhook) to allow [External DNS](https://github.com/kubernetes-sigs/external-dns/) to gather service and ingress hosts from my clusters and deploy the records without any extra local resolvers.

---

## ๐Ÿ”ง Hardware

Click to see the rack!
Updated 05/25/2024

rack

| Device | Count | OS Disk Size | Data Disk Size | Ram | Operating System | Purpose |
|-------------------------|-------|--------------|----------------------|------|------------------|-------------------|
| UXG-Max | 1 | - | - | - | UniFi OS | Router |
| UCK-G2-Plus | 1 | - | 250 GB HDD | 3GB | UniFi OS | UniFi Management |
| US-24-G1 | 1 | - | - | - | - | Core Switch |
| U6-LR | 1 | - | - | - | - | Office AP |
| UAP-AC-Pro | 1 | - | - | - | - | Dining Room AP |
| USP-PDU-Pro | 1 | - | - | - | - | Rack PDU |
| Raspberry Pi 4 | 3 | 256GB SSD | - | 8GB | Talos | Raspberry Cluster |
| Lenovo ThinkCentre M900 | 6 | 256GB SSD | 1TB NVMe (rook-ceph) | 16GB | Talos | Kubernetes Nodes |
| Fran | 1 | 2x1TB SSD | 5x8TB (raidz2) | 64GB | Debian | Storage Cluster |
| Raspberry Pi 3 | 1 | 32GB (SD) | - | 4GB | - | Network KVM |
| APC Back-Ups 1500 | 1 | - | - | - | - | UPS |

---

## โญ Stargazers

[![Star History Chart](https://api.star-history.com/svg?repos=kashalls/home-cluster&type=Date)](https://star-history.com/#kashalls/home-cluster&Date)

---

## Inspiration

Thanks to all the people who donate their time to the [Home Operations](https://discord.gg/home-operations) community.

Special thanks to: [แ—ชั”ฮฝฮนฮท แ—ทฯ…ะฝสŸ](https://github.com/onedr0p/home-cluster), [Bแด‡ส€ษดแด… Sแด„สœแดส€ษขแด‡ส€s](https://github.com/bjw-s/k8s-gitops), and [Toboshii Nakama](https://github.com/toboshii/home-cluster) for their assistance.

Check out [kubesearch.dev](https://kubesearch.dev) to see what other users are running in their kubernetes home labs!