All Projects → onedr0p → K3s Gitops Arm

onedr0p / K3s Gitops Arm

k3s cluster backed by Flux (GitOps) up and running on a cluster of RPi4

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to K3s Gitops Arm

Nginx Ee
Automated Nginx compilation from sources with additional modules support. Compatible with WordOps, EasyEngine & Plesk
Stars: ✭ 132 (-2.22%)
Mutual labels:  cloudflare, ubuntu
Vagrant Box Templates
Stars: ✭ 100 (-25.93%)
Mutual labels:  ansible, ubuntu
Ubuntu1604 Cis
Ubuntu CIS Hardening Ansible Role
Stars: ✭ 88 (-34.81%)
Mutual labels:  ansible, ubuntu
Packer Ubuntu 1404
DEPRECATED - Packer Example - Ubuntu 14.04 Vagrant Box using Ansible provisioner
Stars: ✭ 81 (-40%)
Mutual labels:  ansible, ubuntu
Serverfarmer
Manage multiple servers with different operating systems, configurations, requirements etc. for many separate customers in an outsourcing model.
Stars: ✭ 122 (-9.63%)
Mutual labels:  ansible, ubuntu
Ansible Haproxy
Ansible role to set up (the latest version of) HAProxy in Ubuntu systems
Stars: ✭ 83 (-38.52%)
Mutual labels:  ansible, ubuntu
Selfhosted
rootless docker compose + traefik
Stars: ✭ 97 (-28.15%)
Mutual labels:  cloudflare, ubuntu
Docker Ubuntu1804 Ansible
Ubuntu 18.04 LTS (Bionic) Docker container for Ansible playbook and role testing.
Stars: ✭ 61 (-54.81%)
Mutual labels:  ansible, ubuntu
5minutes
First 5 minutes on new servers. Secure your servers with single command - Ansible playbook
Stars: ✭ 111 (-17.78%)
Mutual labels:  ansible, ubuntu
Ansible Postfix
Ansible role to set up postfix in Debian-like systems
Stars: ✭ 102 (-24.44%)
Mutual labels:  ansible, ubuntu
Rocket.chat.ansible
Deploy Rocket.Chat with Ansible!
Stars: ✭ 80 (-40.74%)
Mutual labels:  ansible, ubuntu
Django Init
Project template used at Fueled for scaffolding new Django based projects. 💫
Stars: ✭ 126 (-6.67%)
Mutual labels:  ansible, ubuntu
Ansible Nas
Build a full-featured home server or NAS replacement with an Ubuntu box and this playbook.
Stars: ✭ 1,198 (+787.41%)
Mutual labels:  ansible, ubuntu
Plexguide.com
Welcome to https://PlexGuide.com ~ Rapidly deploy multiple-hasty Docker Containers through Ansible with local or Unlimited Google HD Space!
Stars: ✭ 1,631 (+1108.15%)
Mutual labels:  ansible, ubuntu
Ubuntu Dev Machine Setup
Configure your Ubuntu 20.04 LTS and 20.10 Desktop
Stars: ✭ 63 (-53.33%)
Mutual labels:  ansible, ubuntu
Learning Tools
A collection of tools and files for learning new technologies
Stars: ✭ 1,287 (+853.33%)
Mutual labels:  ansible, ubuntu
Ansible Mariadb Galera Cluster
Stars: ✭ 49 (-63.7%)
Mutual labels:  ansible, ubuntu
Ansible Wordpress
Ansible role to set up (multiple) wordpress installations in Debian-like systems (using wp-cli)
Stars: ✭ 58 (-57.04%)
Mutual labels:  ansible, ubuntu
Packer Ubuntu 1804
This build has been moved - see README.md
Stars: ✭ 101 (-25.19%)
Mutual labels:  ansible, ubuntu
Mattermost Ansible
Ansible playbook to provide a turnkey solution for the Team Edition of Mattermost
Stars: ✭ 126 (-6.67%)
Mutual labels:  ansible, ubuntu

IMPORTANT NOTE

This repository is really out of date, I have moved onto Flux v2 and do not use Raspberry Pis anymore. This is now archived and I will leave it up for people to read.

k3s-gitops-arm

Kubernetes

Discord

Build a Kubernetes (k3s) cluster with RPis and utilize GitOps for managing cluster state. I would like to give a shout-out to k8s-gitops, the big brother of this repo, created by @billimek.

This repo uses a lot of multi-arch images provided by raspbernetes/multi-arch-images.

Note: A lot of files in this project have @CHANGEME comments, these are things that are specific to my set up that you may need to change.


Prerequisites

Hardware

  • 3x Raspberry Pi 4 (recommended 4GB RAM model)
  • 3x SD cards (recommended 32GB)
  • 3x USB 3.x flash drives (recommended for local storage)
  • A NFS server for storing persistent data (recommended for shared storage)

Software

Note: I use the fish shell for a lot of my commands. Some will work in Bash but others will not, see here for more information.


Directory topology

.
├── ./ansible        # Ansible playbook to run after the RPis have been flashed
├── ./deployments    # Flux will only scan and deploy from this directory
├── ./setup          # Setup of the cluster
├── ./secrets        # Scripts to generate secrets for Sealed Secrets
└── ./docs           # Documentation

Network topology

image

IP Function
192.168.1.1 Router (USG)
192.168.1.170 NFS Server
192.168.42.1/24 k3s cluster CIDR, VLAN 42
192.168.42.23 k3s master (k3s-master)
192.168.42.24 k3s worker (k3s-worker-a)
192.168.42.25 k3s worker (k3s-worker-b)

Let's get started

1. Flash SD Card with Ubuntu

See ubuntu.md

2. Provision RPis with Ansible

Ansible is a great automation tool and here I am using it to provision the RPis.

See ansible.md and review the files in the ansible folder.

3. Install k3s on your RPis using k3sup

k3sup is a neat tool provided by @alexellis that helps get your k3s cluster up and running quick.

For manual deployment see k3sup.md, and for an automated script see bootstrap-cluster.sh

4. Flux and Helm Operator

Helm is a package manager for Kubernetes.

Flux is the GitOps tool I've chosen to have this Git Repository manage my clusters state.

For manual deployment see helm-flux.md, and for an automated script see bootstrap-cluster.sh

Additional Components

Sealed Secrets

Sealed Secrets are a "one-way" encrypted Secret that can be created by anyone, but can only be decrypted by the controller running in the target cluster. The Sealed Secret is safe to share publicly, upload to git repositories, give to the NSA, etc. Once the Sealed Secret is safely uploaded to the target Kubernetes cluster, the sealed secrets controller will decrypt it and recover the original Secret.

See sealed-secrets.md and review the files in the secrets folder.

MetalLB

MetalLB is a load-balancer implementation for bare metal Kubernetes clusters, using standard routing protocols.

Review the file metallb.yaml

Cert Manager

Cert-Manager will automatically provision and manage TLS certificates in Kubernetes. In this setup I am using Cloudflare as the DNS challenge.

NGINX Ingress /engine x/

NGINX Ingress Controller is an Ingress controller that uses ConfigMap to store the NGINX configuration.

Review the file nginx-ingress.yaml

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].