Skip to content

Kubernetes configuration, CI, applied to the cluster with FluxCD

License

Notifications You must be signed in to change notification settings

TkPegatron/homelab-k8sflux

Repository files navigation

My Kubernetes homelab repository :octocat:

... managed with Flux, Renovate and GitHub Actions 🤖


📖 Overview

This repository contains kubernetes manifests the ansible provisioning playbooks for my homelab's k8s cluster.

⛵ Kubernetes

There is a template over at onedr0p/flux-cluster-template if you wanted to try and follow along with some of the practices I use here.

Installation

My cluster is k3s provisioned overtop bare-metal Rocky Linux using the Ansible galaxy role ansible-role-k3s. This is a semi hyper-converged cluster, workloads and block storage are sharing the same available resources on my nodes while I have a separate server for long-term, backup, and volume file storage (NFS & S3).

Core Components

  • cert-manager: manages certificates, like certbot but as a k8s operator and api extensions.
  • external-dns: synchronizes DNS records from my cluster ingresses to a DNS provider.
  • ingress-nginx: ingress controller for Kubernetes using NGINX as a reverse proxy and load balancer.
  • rook: distributed block storage.
  • sops: Secrets encryption mechanism for Kubernetes secrets (among other uses).

GitOps

Flux watches my kubernetes folder (see Directories below) and makes the changes to my cluster based on the YAML manifests.

Renovate watches my entire repository looking for dependency updates, when they are found a PR is automatically created. When some PRs are merged Flux applies the changes to my cluster.

Directories

This Git repository contains the following directories under kubernetes.

📁 kubernetes      # Kubernetes cluster defined as code
├─📁 bootstrap     # Flux installation
├─📁 flux-config   # Main Flux configuration repository
├─📁 operators     # Kubernetes Operators, Controllers, and Plugins grouped by namespace
└─📁 applications  # Apps deployed into my cluster grouped by namespace

🤝 Gratitude and Thanks

Thanks to all the people who donate their time to the Kubernetes @Home Discord community. A lot of inspiration for my cluster comes from the people that have shared their clusters using the k8s-at-home GitHub topic. Be sure to check out the Kubernetes @Home search for ideas on how to deploy applications or get ideas on what you can deploy.


🔏 License

See LICENSE

About

Kubernetes configuration, CI, applied to the cluster with FluxCD

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published