Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

Pumba98/k3s-flux-cluster

Repository files navigation

⚠️ Deprecation and Archive Notice ⚠️

This repository is no longer maintained! My Clusters found a new home at Pumba98/flux2-gitops


k3s flux renovate

Single k3s cluster backed by Flux v2

Kubernetes cluster using the GitOps tool Flux.
The Git repository is the driving the state of the Kubernetes cluster.
The awesome Flux SOPS integration is used to encrypt secrets with gpg.

💻  Software

The following components are installed on the k3s cluster.

Software Purpose
Flux GitOps Tool managing the cluster
Longhorn Persistent Block Storage Provisioner
NGINX Ingress Controller Cluster Ingress controller
MetalLB Bare metal LoadBalancer
Cert-Manager Letsencrypt certificates with Cloudflare DNS
ExternalDNS Configure Cloudflare DNS Servers
kube-vip Virtual IP Load-Balancer for Control Plane High Availability
Kube-Prometheus Stack Prometheus & Exporters to monitor the cluster
Grafana Monitoring & Logging Dashboard
Alertmanager Monitoring Alerts
Grafana Loki Log aggregation system
System Upgrade Controller Automated k3s upgrades
Descheduler Evicts pods to optimize scheduling
Authelia SSO & 2FA authentication server for Cluster Web Apps
Nextcloud File share and collaboration platform
Vaultwarden Unofficial Bitwarden compatible server written in Rust
Firefly-iii Personal finance manager
Paperless-ngx Document management system
Mailu Email stack on kubernetes
Rancher Kubernetes Management Dashboard
Homer Static dashboard for the cluster applications
Pod-Gateway Route mail traffic through an external gateway
Goldilocks Utility to help identifying good resource requests and limits

🤖  Automation

Renovate Bot makes sure the Cluster is never outdated.

It creates PullRequests when Helm charts or Docker images have newer versions available and even keeps Flux and k3s up-to-date.

🤝  Thanks

Big shout out to k8s@home for their k3s-cluster-template and everyone from awesome-home-kubernetes for the inspiration ❤️

📖  Notes

📍 Installation Notes
1. ⚠️  Install pre-commit hooks
pre-commit install-hooks
  1. Encrypt all secrets with SOPS
export GPG_TTY=$(tty)
sops --encrypt --in-place ./cluster/base/cluster-secrets.sops.yaml
  1. Pre-create the flux-system namespace
kubectl create namespace flux-system --dry-run=client -o yaml | kubectl apply -f -
  1. Add the Flux GPG key in-order for Flux to decrypt SOPS secrets
sops -d ./flux-sops-gpg-secret.sops.yaml | kubectl apply -f -
  1. (Optional) Add the Flux SSH key in-order for Flux to pull private git repositories
sops -d ./flux-secret.sops.yaml | kubectl apply -f -
  1. Push everything & Install Flux
kubectl apply --kustomize=./cluster/base/flux-system

📍 Due to race conditions with the Flux CRDs run the last command twice. There should be no errors on the second run.

About

Archived: My k3s cluster backed by GitOps with Flux and SOPS.

Topics

Resources

License

Stars

Watchers

Forks