{"id":30165333,"url":"https://github.com/yuandrk/homelabops","last_synced_at":"2026-04-11T12:03:44.981Z","repository":{"id":270393747,"uuid":"908358432","full_name":"yuandrk/homelabops","owner":"yuandrk","description":"GitOps homelab infrastructure with K3s, FluxCD, Terraform, and Ansible. Features multi-arch cluster, Cloudflare tunnels, and LLM services.","archived":false,"fork":false,"pushed_at":"2025-08-10T14:00:48.000Z","size":322,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-10T16:13:29.822Z","etag":null,"topics":["ansible","cloudflare-tunnel","fluxcd","gitops","homelab","infrastructure-as-code","k3s","kubernetes","llm","mermaid-diagrams","multi-arch","open-webui","pihole","raspberry-pi","self-hosted","terraform"],"latest_commit_sha":null,"homepage":"https://chat.yuandrk.net","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuandrk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-25T21:16:18.000Z","updated_at":"2025-08-10T14:00:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"9a24774b-0ded-4d5a-8ed0-bf2ea27d1ea7","html_url":"https://github.com/yuandrk/homelabops","commit_stats":null,"previous_names":["yuandrk/homelabops"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/yuandrk/homelabops","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuandrk%2Fhomelabops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuandrk%2Fhomelabops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuandrk%2Fhomelabops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuandrk%2Fhomelabops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuandrk","download_url":"https://codeload.github.com/yuandrk/homelabops/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuandrk%2Fhomelabops/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269939896,"owners_count":24500357,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","cloudflare-tunnel","fluxcd","gitops","homelab","infrastructure-as-code","k3s","kubernetes","llm","mermaid-diagrams","multi-arch","open-webui","pihole","raspberry-pi","self-hosted","terraform"],"created_at":"2025-08-11T19:00:38.186Z","updated_at":"2026-04-11T12:03:44.976Z","avatar_url":"https://github.com/yuandrk.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HomeLab GitOps\n\n[![Kubernetes](https://img.shields.io/badge/K3s-v1.33-326CE5?logo=kubernetes\u0026logoColor=white)](https://k3s.io/) [![FluxCD](https://img.shields.io/badge/FluxCD-v2.6.0-5468FF?logo=flux\u0026logoColor=white)](https://fluxcd.io/) [![Terraform](https://img.shields.io/badge/Terraform-1.13+-7B42BC?logo=terraform\u0026logoColor=white)](https://terraform.io/) [![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE) [![Terraform Plan](https://github.com/yuandrk/homelabops/actions/workflows/terraform-plan.yml/badge.svg)](https://github.com/yuandrk/homelabops/actions/workflows/terraform-plan.yml) [![Terraform Apply](https://github.com/yuandrk/homelabops/actions/workflows/terraform-apply.yml/badge.svg)](https://github.com/yuandrk/homelabops/actions/workflows/terraform-apply.yml)\n\nProduction-grade homelab infrastructure running K3s with GitOps automation, Infrastructure as Code, and full observability.\n\n---\n\n## 📑 Table of Contents\n\n- [Overview](#-overview)\n- [Tech Stack](#-tech-stack)\n- [Architecture](#-architecture)\n- [Quick Start](#-quick-start)\n- [Services](#-services)\n- [Current Status](#-current-status)\n- [Repository Structure](#-repository-structure)\n- [Documentation](#-documentation)\n- [License](#-license)\n\n---\n\n## 📋 Overview\n\nThis repository contains Infrastructure as Code and documentation for a 4-node K3s cluster with GitOps automation. Infrastructure is managed via Ansible, Terraform for cloud resources, and FluxCD for continuous deployment.\n\n## 🛠 Tech Stack\n\n| Category | Technologies |\n|----------|-------------|\n| **Container Orchestration** | ![Kubernetes](https://img.shields.io/badge/K3s-326CE5?logo=kubernetes\u0026logoColor=white) ![Helm](https://img.shields.io/badge/Helm-0F1689?logo=helm\u0026logoColor=white) |\n| **GitOps \u0026 CD** | ![FluxCD](https://img.shields.io/badge/FluxCD-5468FF?logo=flux\u0026logoColor=white) ![GitHub Actions](https://img.shields.io/badge/GitHub_Actions-2088FF?logo=github-actions\u0026logoColor=white) |\n| **Infrastructure as Code** | ![Terraform](https://img.shields.io/badge/Terraform-7B42BC?logo=terraform\u0026logoColor=white) ![Ansible](https://img.shields.io/badge/Ansible-EE0000?logo=ansible\u0026logoColor=white) |\n| **Monitoring** | ![Prometheus](https://img.shields.io/badge/Prometheus-E6522C?logo=prometheus\u0026logoColor=white) ![Grafana](https://img.shields.io/badge/Grafana-F46800?logo=grafana\u0026logoColor=white) |\n| **Networking** | ![Cloudflare](https://img.shields.io/badge/Cloudflare-F38020?logo=cloudflare\u0026logoColor=white) ![Traefik](https://img.shields.io/badge/Traefik-24A1C1?logo=traefikproxy\u0026logoColor=white) |\n| **Database** | ![PostgreSQL](https://img.shields.io/badge/PostgreSQL-4169E1?logo=postgresql\u0026logoColor=white) |\n| **Security** | ![SOPS](https://img.shields.io/badge/SOPS-encrypted-green) ![OIDC](https://img.shields.io/badge/AWS_OIDC-FF9900?logo=amazonaws\u0026logoColor=white) |\n\n## 🏗 Architecture\n\n![HomeLab Architecture](docs/architecture-overview.png)\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eInfrastructure Details\u003c/b\u003e\u003c/summary\u003e\n\n| Component | Details |\n|-----------|---------|\n| **Cluster** | 4-node K3s (1 master + 3 workers) on Ubuntu 24.04 LTS |\n| **GitOps** | FluxCD v2.6.0 with automatic reconciliation |\n| **Networking** | Dual network (10.10.0.0/24 LAN + 192.168.1.0/24 Wi-Fi) |\n| **External Access** | Cloudflare Tunnels + Traefik ingress |\n| **DNS** | Pi-hole (host) + CoreDNS (cluster) |\n| **Database** | PostgreSQL 15 on k3s-worker3 |\n| **GPU** | NVIDIA GeForce MX130 (Ollama LLM workloads) |\n| **Storage** | 76Gi total (local-path provisioner) |\n\n\u003c/details\u003e\n\n## 🚀 Quick Start\n\n**Prerequisites:** `kubectl`, `flux`, `terraform`, `ansible` | Ubuntu 24.04 nodes with SSH access\n\n```bash\n# Clone repository\ngit clone git@github.com:yuandrk/homelabops.git \u0026\u0026 cd homelabops\n\n# Verify cluster health\nkubectl get nodes                          # All nodes Ready\nkubectl get kustomizations -n flux-system  # All reconciled\nkubectl get helmreleases -A                # All deployed\n\n# Check FluxCD status\nflux get all -A\n```\n\n📖 **Detailed Guides:** [K3s Deployment](docs/k3s-deploy-summary.md) · [Ansible](docs/ansible-overview.md) · [Terraform](docs/terraform-guide.md) · [FluxCD](docs/fluxcd-setup.md)\n\n## 🌐 Services\n\n| Service | Description | URL |\n|---------|-------------|-----|\n| **Immich** | Photo management | `photos.yuandrk.net` |\n| **Grafana** | Monitoring dashboards | `grafana.yuandrk.net` |\n| **ActualBudget** | Financial management | `budget.yuandrk.net` |\n| **Uptime Kuma** | Service monitoring | `uptime.yuandrk.net` |\n| **n8n** | Workflow automation | `n8n.yuandrk.net` |\n| **pgAdmin** | PostgreSQL admin | `pgadmin.yuandrk.net` |\n| **Headlamp** | Kubernetes dashboard | `headlamp.yuandrk.net` |\n| **Pi-hole** | DNS + ad-blocking | `pihole.yuandrk.net` |\n\n## 📊 Current Status\n\n### Cluster Health ✅\n\n| Component | Status |\n|-----------|--------|\n| K3s Nodes | 4/4 Ready (v1.33.x) |\n| Kustomizations | 7 reconciled |\n| HelmReleases | 6 deployed |\n| External Services | 8 via Cloudflare Tunnels |\n\n### GitOps ✅\n- **Sync**: Automatic reconciliation every 1 minute\n- **Repository**: Connected via SSH deploy key\n- **Webhook**: External trigger enabled\n\n### Monitoring ✅\n- **Prometheus**: 15-day retention, 10Gi storage\n- **Grafana**: Flux, node, and cluster dashboards\n- **Alerts**: 36 active PrometheusRules\n\n### CI/CD ✅\n- **Terraform Plan**: Auto-comment on PRs\n- **Terraform Apply**: Auto-deploy with environment protection\n- **GitHub OIDC**: Secure AWS authentication\n- **Renovate**: Automated dependency updates\n\n## 📁 Repository Structure\n\n```\nhomelabops/\n├── .github/workflows/    # CI/CD (Terraform plan/apply, Renovate)\n├── ansible/              # Node configuration and K3s deployment\n├── apps/                 # Application deployments (FluxCD)\n├── clusters/             # FluxCD cluster configurations\n├── docs/                 # Comprehensive documentation\n├── infrastructure/       # Core infrastructure + monitoring\n├── scripts/              # Automation utilities\n├── terraform/            # Infrastructure as Code\n│   └── live/homelab/     # AWS OIDC, Cloudflare tunnels\n└── tools/                # Development tools\n```\n\n## 📚 Documentation\n\n| Topic | Description |\n|-------|-------------|\n| [Architecture Diagrams](docs/architecture-diagrams.md) | Mermaid infrastructure diagrams |\n| [Network Architecture](docs/network-architecture.md) | Network topology and setup |\n| [K3s Deployment](docs/k3s-deploy-summary.md) | Cluster deployment guide |\n| [FluxCD Setup](docs/fluxcd-setup.md) | GitOps setup and configuration |\n| [FluxCD Troubleshooting](docs/fluxcd-troubleshooting.md) | Common issues and solutions |\n| [Monitoring Setup](docs/monitoring-setup.md) | Prometheus/Grafana stack |\n| [Terraform](docs/terraform-guide.md) | Cloud infrastructure management |\n| [Ansible](docs/ansible-overview.md) | Infrastructure automation |\n| [SOPS Secrets](docs/sops-secrets.md) | Secrets management with age encryption |\n| [GPU Setup](docs/gpu-setup.md) | NVIDIA GPU configuration for K3s |\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003ci\u003eBuilt with GitOps principles · Infrastructure as Code · Automated deployment\u003c/i\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuandrk%2Fhomelabops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuandrk%2Fhomelabops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuandrk%2Fhomelabops/lists"}