Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.
/ k8s-gitops Public archive
generated from onedr0p/cluster-template

Stateful Description of my Home Kubernetes Cluster Workloads

License

Notifications You must be signed in to change notification settings

jgilfoil/k8s-gitops

Repository files navigation

Jason's K3s Cluster state managed by Flux

Archived

This repo has been retired in favor of my new, updated home-cluster repo, https://github.com/jgilfoil/home-cluster. This repo is here just for historical purposes.

GitOps Repo for deploying my k3s cluster with k3sup backed by Flux and SOPS.

Overview

👋  Introduction

The following components are installed in this k3s cluster.

📝  Prerequisites

💻  Nodes

Already provisioned Bare metal or VMs with any modern operating system like Ubuntu, Debian or CentOS.

🔧  Tools

📍 These tools are pre-installed in a Vagrant VM, purpose built to mangage this cluster. You can find that repo here

Tool Purpose Minimum version Required
k3sup Tool to install k3s on your nodes 0.10.2
kubectl Allows you to run commands against Kubernetes clusters 1.21.0
flux Operator that manages your k8s cluster based on your Git repository 0.12.3
SOPS Encrypts k8s secrets with GnuPG 3.7.1
GnuPG Encrypts and signs your data 2.2.27
pinentry Allows GnuPG to read passphrases and PIN numbers 1.1.1
direnv Exports env vars based on present working directory 2.28.0
pre-commit Runs checks during git commit 2.12.0
kustomize Template-free way to customize application configuration 4.1.0
helm Manage Kubernetes applications 3.5.4

⚠️  pre-commit

Install pre-commit and the pre-commit hooks that come with this repository. sops-pre-commit will check to make sure you are not by accident commiting your secrets un-encrypted.

After pre-commit is installed on your machine run:

pre-commit install-hooks

📂  Repository structure

The Git repository contains the following directories under cluster and are ordered below by how Flux will apply them.

  • base directory is the entrypoint to Flux
  • crds directory contains custom resource definitions (CRDs) that need to exist globally in your cluster before anything else exists
  • core directory (depends on crds) are important infrastructure applications (grouped by namespace) that should never be pruned by Flux
  • apps directory (depends on core) is where your common applications (grouped by namespace) could be placed, Flux will prune resources here if they are not tracked by Git anymore
cluster
├── apps
│   ├── default
│   ├── networking
│   └── system-upgrade
├── base
│   └── flux-system
├── core
│   ├── cert-manager
│   ├── metallb-system
│   ├── namespaces
│   └── system-upgrade
└── crds
    └── cert-manager

Setup

See full documentation under docs

🤝  Thanks

Big shout out to the K8s@Home team for the majority of the work that went into this cluster's bootstrap and their continuied maintenance of much of the underlying charts and images that underpin it's services.

About

Stateful Description of my Home Kubernetes Cluster Workloads

Topics

Resources

License

Stars

Watchers

Forks