Giter Site home page Giter Site logo

aflyingcougar / gitops Goto Github PK

View Code? Open in Web Editor NEW

This project forked from crutonjohn/gitops

0.0 0.0 0.0 7.18 MB

GitOps principles to define kubernetes cluster state via code. Community around k8s@home is on discord: https://discord.gg/RGvKzVg

Home Page: https://crutonjohn.github.io/gitops

License: Apache License 2.0

Shell 59.91% Python 28.02% Nix 12.08%

gitops's Introduction

It's My k8s in a Box


Discord


📖  Overview

This repo is my Kubernetes cluster in a declarative state. Flux and Helm Operator watch my clusters folder and makes the changes to my cluster based on the yaml manifests. Renovate auto updates images and helm charts based on upstream changes.

Feel free to join our Discord if you have any questions.


⚓  k8s Distro

Currently using k3s by way of a customized template-cluster-k3s ansible playbook.


🚤  Deploying k3s

  1. pip install pipenv
  2. pipenv install
  3. pipenv run gilt overlay
  4. pipenv run ansible-playbook -i provision/ansible/inventory/inventory.yaml provision/ansible/playbooks/k3s-install.yaml
  5. k label nodes k-node1.crutonjohn.com k-node2.crutonjohn.com k-node3.crutonjohn.com k-node4.crutonjohn.com k-node5.crutonjohn.com crutonjohn.com/rook=true
  6. kubectl taint nodes k-master01.crutonjohn.com k-master02.crutonjohn.com k-master03.crutonjohn.com crutonjohn=control-plane:NoSchedule

Installing and bootstrapping flux

  1. Have a working kubeconfig

  2. Have flux installed

  3. Have GITHUB_TOKEN env var set to a Github PAT

  4. To boostrap the cluster:

     flux bootstrap github \
     --components=source-controller,kustomize-controller,helm-controller,notification-controller \
     --path=clusters/env/production \
     --version=latest \
     --owner=crutonjohn \
     --repository=gitops
    
  5. sops -d sops-secret.enc.yaml | kubectl apply -f -

if you need storage :)

kustomize build clusters/core/pvc/


💻  Hardware Configuration

All my nodes below are running bare metal Ubuntu 20.04.x

Device Count OS Disk Size Data Disk Size Ram Purpose
Raspberry Pi 4 3 120GB (USB Booting SSD) N/A 4 GB k8s Control Plane
HP 800 G3 Mini 3 1x 120GB SSD 1x 1TB M.2 (rook-ceph) 32GB k8s Workers
Dell 7040 Micro 2 1x 500B HDD 1x 1TB M.2 SSD (rook-ceph) 32GB k8s Workers

💻  Supporting Infrastructure

Device Count OS Disk Size Data Disk Size Ram Purpose
Supermicro CSE-512B 1 2x 500GB Spinning Rust N/A 32GB ZFS on Linux Host
Xyratex HB-2425 1 N/A 24x 1TB SSD N/A ZFS Disk Shelf

📝  IP addresses

This table is a reference to IP addresses in my deployments and may not be fully up-to-date

Deployment Address
traefik-ingress (external) 192.168.130.100
traefik-ingress (internal) 192.168.130.101
syncthing-discovery 192.168.130.104
syslog-ng 192.168.130.106
home-assistant 192.168.130.108
emqx 192.168.130.109
scrypted 192.168.130.110

🤝  Community

Thanks to all the people who donate their time to the Kubernetes @Home community. Join us at https://discord.gg/k8s-at-home

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

gitops's People

Contributors

crutonjohn avatar renovate[bot] avatar renovate-bot avatar aflyingcougar avatar katlinhorton 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.