{"id":19267682,"url":"https://github.com/binary-braids/kubernetes-homelab","last_synced_at":"2026-04-09T14:06:10.026Z","repository":{"id":65092416,"uuid":"580677597","full_name":"binary-braids/kubernetes-homelab","owner":"binary-braids","description":"K3s cluster backed by FluxCD and SOPS with age","archived":false,"fork":false,"pushed_at":"2026-03-01T20:47:25.000Z","size":1842,"stargazers_count":4,"open_issues_count":11,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-01T22:37:23.873Z","etag":null,"topics":["age","fluxcd","homelab","k3s","kubernetes","sops"],"latest_commit_sha":null,"homepage":"","language":"YAML","has_issues":true,"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/binary-braids.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-12-21T06:53:56.000Z","updated_at":"2026-02-22T17:31:00.000Z","dependencies_parsed_at":"2026-01-22T04:04:33.277Z","dependency_job_id":null,"html_url":"https://github.com/binary-braids/kubernetes-homelab","commit_stats":null,"previous_names":["data-tangles/kubernetes-homelab","binary-braids/kubernetes-homelab"],"tags_count":84,"template":false,"template_full_name":null,"purl":"pkg:github/binary-braids/kubernetes-homelab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binary-braids%2Fkubernetes-homelab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binary-braids%2Fkubernetes-homelab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binary-braids%2Fkubernetes-homelab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binary-braids%2Fkubernetes-homelab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binary-braids","download_url":"https://codeload.github.com/binary-braids/kubernetes-homelab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binary-braids%2Fkubernetes-homelab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30011545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T17:00:27.440Z","status":"ssl_error","status_checked_at":"2026-03-02T17:00:03.402Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["age","fluxcd","homelab","k3s","kubernetes","sops"],"created_at":"2024-11-09T20:13:44.942Z","updated_at":"2026-04-01T21:49:13.129Z","avatar_url":"https://github.com/binary-braids.png","language":"YAML","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![k3s](https://img.shields.io/badge/k3s-orange?style=for-the-badge\u0026logo=k3s)](https://k3s.io/)\r\n[![flux](https://img.shields.io/badge/GitOps-Flux-blue?style=for-the-badge\u0026logo=git)](https://fluxcd.io/)\r\n[![renovate](https://img.shields.io/badge/renovate-enabled-brightgreen?style=for-the-badge\u0026logo=renovatebot)](https://github.com/renovatebot/renovate)\r\n\r\n[![CI](https://github.com/binary-braids/kubernetes-homelab/actions/workflows/ci.yml/badge.svg)](https://github.com/binary-braids/kubernetes-homelab/actions/workflows/ci.yml)\r\n[![Host 01 Terraform CD](https://github.com/binary-braids/kubernetes-homelab/actions/workflows/host_01_terraform.yml/badge.svg)](https://github.com/binary-braids/kubernetes-homelab/actions/workflows/host_01_terraform.yml)\r\n[![Host 02 Terraform CD](https://github.com/binary-braids/kubernetes-homelab/actions/workflows/host_02_terraform.yml/badge.svg)](https://github.com/binary-braids/kubernetes-homelab/actions/workflows/host_02_terraform.yml)\r\n\r\n# Kubernetes Homelab\r\n\r\nThis repo contains all my config for my On-Prem k3s cluster. The cluster is backed by [Flux](https://fluxcd.io/) for GitOps and secrets are encrypted using [SOPS](https://github.com/mozilla/sops) with [Age](https://github.com/FiloSottile/age) encryption.\r\n\r\n\r\n\r\n## 📂 Repository structure\r\n\r\nThe Git repository contains the following directories:\r\n\r\n```sh\r\n📁 .github                  # GitHub Workflows\r\n📁 ansible                  # Ansible Playbooks for Kubernetes bootstrap\r\n📁 apps                     # Core and User Apps utilised within cluster\r\n📁 clusters                 # FluxCD files for applicable clusters\r\n├─📁 on-prem-cluster\r\n│ └─📁 flux-system\r\n📁 terraform                # Terraform modules for Kubernetes node VM's\r\n```\r\n## Getting started\r\n\r\n### Ansible\r\n\r\nThe `site.yml` playbook will full configure a working k3s cluster within your environment. There are a few variables you will need to modify before hand such as the `inventory`\r\n\r\nThe `reset.yml` playbook will remove the k3s components from your machines\r\n\r\n### Terraform \r\n\r\nI utilised Terraform with Promox to build my k3s nodes. If you have standalone Promox hosts like me you can make use of the Terraform modules to build your nodes replacing the relevant variables and such depending on the amount of hosts/nodes you have.\r\n\r\nThe following assumptions are made:\r\n\r\n- You have an existing K8s cluster\r\n- You have the Flux CLI installed (instructions [here](https://fluxcd.io/flux/get-started/))\r\n\r\n### Flux\r\n\r\nThe quickest way to get up and running is to bootstrap your cluster with flux by doing the following:\r\n\r\n```\r\nflux bootstrap github \\\r\n  --owner=\u003crepo owner name\u003e \\\r\n  --repository=\u003crepo name\u003e \\\r\n  --branch=main \\\r\n  --path=./clusters/my-cluster \\\r\n  --personal\r\n```\r\nThe above will bootstrap your cluster and synchronize it with the ./clusters/my-cluster path in the repo. You will notice in the repo that a new flux-system folder will appear. This is what Flux creates when it runs the bootstrap operation.\r\n\r\nFor simple setups you can place subfolders in the ./cluster/my-cluster path with your app manifests and Flux will automatically pick this up and deploy it to your cluster.\r\n\r\n### SOPS\r\n\r\nVisit the Mozilla SOPS [repo](https://github.com/mozilla/sops) to setup SOPS which you will use with Age encryption below\r\n\r\n### Age\r\n\r\nYou can review the following [repo](https://github.com/FiloSottile/age) which will detail setting up Age encryption\r\n\r\n## Configuring Flux with SOPS\r\n\r\nNow that you have Flux, SOPS and Age setup we'll get into integrating this all together. First you will need to copy over your Age created key to your flux-system namespace:\r\n\r\n```\r\ncat age.agekey | kubectl create secret generic sops-age --namespace=flux-system --from-file=age.agekey=/dev/stdin\r\n```\r\n\r\nOnce that's done you can edit the gotk-sync.yaml file in your ./clusters/my-cluster/flux-system/ repo path to look something like so:\r\n\r\n```\r\napiVersion: source.toolkit.fluxcd.io/v1beta2\r\nkind: GitRepository\r\nmetadata:\r\n  name: flux-system\r\n  namespace: flux-system\r\nspec:\r\n  interval: 1m0s\r\n  ref:\r\n    branch: main\r\n  secretRef:\r\n    name: flux-system\r\n  url: ssh://git@github.com/myname/myrepo\r\n---\r\napiVersion: kustomize.toolkit.fluxcd.io/v1beta2\r\nkind: Kustomization\r\nmetadata:\r\n  name: flux-system\r\n  namespace: flux-system\r\nspec:\r\n  interval: 10m0s\r\n  path: ./clusters/on-prem-cluster\r\n  prune: true\r\n  sourceRef:\r\n    kind: GitRepository\r\n    name: flux-system\r\n  decryption:           ##\r\n    provider: sops      ##  \u003c -- add these 4 lines\r\n    secretRef:          ##\r\n      name: sops-age    ##\r\n```\r\nOnce that change is made, Flux should reconcile these changes. You are now ready to encrypt secrets and add them into your repo and Flux will automatically decrypt them\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinary-braids%2Fkubernetes-homelab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinary-braids%2Fkubernetes-homelab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinary-braids%2Fkubernetes-homelab/lists"}