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

https://github.com/xxczaki/homelab

GitOps configuration for my local homelab K8s cluster
https://github.com/xxczaki/homelab

argo-cd gitops grafana homelab k8s kubernetes loki longhorn pi-hole sealed-secrets tailscale tailscale-operator

Last synced: 4 months ago
JSON representation

GitOps configuration for my local homelab K8s cluster

Awesome Lists containing this project

README

          

# xxczaki/homelab

> A GitOps-managed Kubernetes homelab running on a Raspberry Pi, powered by Argo CD

Single-node [K3s](https://k3s.io) cluster managed entirely through [Argo CD](https://argoproj.github.io/cd/) using the [app-of-apps pattern](https://argo-cd.readthedocs.io/en/stable/operator-manual/cluster-bootstrapping/#app-of-apps-pattern). Changes merged to `main` are automatically synced to the cluster using a GitHub webhook.

## Tech stack

- **Orchestration:** [K3s](https://k3s.io) – lightweight Kubernetes
- **GitOps:** [Argo CD](https://argoproj.github.io/cd/)
- **Networking:** [Cilium](https://cilium.io) (eBPF-based CNI) + [Tailscale](https://tailscale.com) (mesh VPN)
- **Storage:** [Longhorn](https://longhorn.io) with [Backblaze B2](https://www.backblaze.com/cloud-storage) backups
- **Monitoring:** [Grafana Cloud](https://grafana.com/products/cloud/) (Prometheus, Loki, Tempo)
- **DNS:** [Pi-hole](https://pi-hole.net)
- **Secrets:** [Sealed Secrets](https://github.com/bitnami-labs/sealed-secrets)
- **Node config:** [Ansible](https://www.ansible.com)
- **Dependency updates:** [Renovate](https://github.com/renovatebot/renovate)

## Applications

| Application | Type | Version |
|---|---|---|
| [argo-cd](apps/argo-cd) | Helm | v9.4.17 |
| [cilium](apps/cilium) | Helm | v1.19.2 |
| [discord-bot](apps/discord-bot) | Helm | v0.20.7 |
| [k8s-monitoring](apps/k8s-monitoring) | Helm | v3.8.5 |
| [longhorn](apps/longhorn) | Helm | v1.11.1 |
| [openclaw](apps/openclaw) | Git | v0.25.1 |
| [pi-hole](apps/pi-hole) | Helm | v2.35.0 |
| [sealed-secrets](apps/sealed-secrets) | Helm | v2.18.4 |
| [system-upgrade](apps/system-upgrade) | Git + Kustomize | v0.19.0 |
| [tailscale](apps/tailscale) | Helm | v1.94.2 |

## Project structure

```
.
├── apps/ # Argo CD application manifests
│ └── /
│ ├── application.yaml # Argo CD Application resource
│ ├── secret.yaml # Sealed Secret (if needed)
│ └── resources/ # Additional resources (if needed)
├── ansible/ # Node provisioning playbooks
│ ├── playbook.yml
│ ├── inventory.yml
│ └── templates/
├── scripts/ # Utility scripts
│ ├── seal-secrets.sh
│ ├── extract-secrets.sh
│ └── generate-apps-table.sh
├── secrets/ # Raw secrets (git-ignored)
└── root-application.yaml # Root Argo CD Application
```

## Getting started

### Prerequisites

- A K3s node (provisioned with the Ansible playbook in `ansible/`)
- `kubectl` configured for the cluster
- [`kubeseal`](https://github.com/bitnami-labs/sealed-secrets?tab=readme-ov-file#kubeseal) CLI for secret management

### Bootstrap

1. Provision the node:

```sh
$ cd ansible && ansible-playbook playbook.yml
```

2. Install the root application:

```sh
$ kubectl apply -f root-application.yaml
```

Argo CD will discover and sync all applications in `apps/` automatically.

### Secrets

To seal secrets for the cluster:

```sh
$ ./scripts/seal-secrets.sh
```

To extract raw secrets from a running cluster:

```sh
$ ./scripts/extract-secrets.sh
```

> [!NOTE]
> Raw secrets are stored in `secrets/` and are git-ignored. Only sealed (encrypted) versions are committed.

## AI disclosure

This project contains code generated by Large Language Models (LLMs), under human supervision and proofreading.