Giter VIP home page Giter VIP logo

home-cluster's Introduction

My home Kubernetes cluster ⛵

... managed by Flux and serviced with RenovateBot 🤖




Discord k3s pre-commit renovate


📖  Overview

This repository is my homelab Kubernetes cluster in a declarative state. Flux2 watches my cluster folder and makes the changes to my cluster based on the YAML manifests.

Feel free to open a Github issue or join the k8s@home Discord if you have any questions.


💻  Cluster setup

My cluster is k3s provisioned overtop Ubuntu 20.04.x using the Ansible galaxy role ansible-role-k3s.

See my ansible folder for my playbooks and roles.


🤖  Automate all the things!

  • Kured to apply OS patches to my nodes.
  • System Upgrade Controller to apply updates to k3s.
  • Renovate keeps my application charts and container images up-to-date by scanning my repo and opening pull requests when it notices updates.
  • Actions Runner Controller operates a self-hosted Github runner in my cluster which I use to generate and apply Sealed Secrets to my cluster.

⚙️  Hardware

My Kubernetes master and worker nodes below are running bare metal Ubuntu 20.04.x

Device Count OS Disk Size Data Disk Size Ram Purpose
Intel NUC8i3BEK 1 256GB NVMe N/A 16GB Kubernetes k3s Master
Intel NUC8i5BEH 3 120GB SSD 1TB NVMe (rook-ceph) 32GB Kubernetes k3s Workers
Intel NUC8i7BEH 2 750GB SSD 1TB NVMe (rook-ceph) 64GB Kubernetes k3s Workers
Qnap NAS (rocinante) 1 N/A 8x12TB RAID6 16GB Media and shared file storage
Synology NAS (serenity) 1 N/A 8x12TB RAID6 4GB Media and shared file storage

🌐  Networking

In my cluster I run coredns, etcd, and external-dns. External-DNS populates CoreDNS with all my ingress records and stores it in etcd. When I'm browsing any of the webapps while on my home network, the traffic is being routed internally and never makes a round trip. The way I set this up is in my router. When a DNS request is made for my domain or any of my subdomains it uses coredns as the DNS server, otherwise it uses whatever upstream DNS I provided.


🔧  Tools

Below are some of the tools I find useful for working with my cluster

Tool Purpose
direnv Set KUBECONFIG environment variable based on present working directory
git-crypt Encrypt certain files in my repository that can only be decrypted with a key on my computers
go-task Replacement for make and makefiles, who honestly likes that?
pre-commit Ensure the YAML and shell script in my repo are consistent
kubetail Tail logs in Kubernetes, also check out stern (which fork? good luck)

🤝  Thanks

A lot of inspiration for my cluster came from the people that have shared their clusters over at awesome-home-kubernetes

home-cluster's People

Contributors

onedr0p avatar renovate[bot] avatar renovate-bot avatar github-actions[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.