All Projects → angelnu → k8s-gitops

angelnu / k8s-gitops

Licence: Apache-2.0 License
My home Kubernetes cluster managed with git-ops

Programming Languages

shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to k8s-gitops

bom-radar-card
A rain radar card using the new tiled images from the Australian BOM
Stars: ✭ 52 (+79.31%)
Mutual labels:  home-assistant
hass nibe
Home Assistant Nibe Uplink Integration
Stars: ✭ 117 (+303.45%)
Mutual labels:  home-assistant
hass-neeo
NEEO custom component for Home Assistant
Stars: ✭ 17 (-41.38%)
Mutual labels:  home-assistant
xboxone-home-assistant
Control your Xbox One from your Home Assistant device.
Stars: ✭ 26 (-10.34%)
Mutual labels:  home-assistant
addon-base-python
Docker Python base images (Alpine) - Home Assistant Community Add-ons
Stars: ✭ 12 (-58.62%)
Mutual labels:  home-assistant
esphome-weather-station
ESPHome version of Elektor weather station v2
Stars: ✭ 140 (+382.76%)
Mutual labels:  home-assistant
Home-Assistant-Lovelace-HTML-Jinja2-Template-card
This card displays provided Jinja2 template as an HTML content of a card. It uses exactly the same engine as Home Assistant in Developer tools.
Stars: ✭ 27 (-6.9%)
Mutual labels:  home-assistant
addon-airsonos
AirSonos - Home Assistant Community Add-ons
Stars: ✭ 50 (+72.41%)
Mutual labels:  home-assistant
home-assistant-frigidaire
Custom component for the Frigidaire integration
Stars: ✭ 11 (-62.07%)
Mutual labels:  home-assistant
button-entity-row
Adds buttons to call services to entity cards
Stars: ✭ 73 (+151.72%)
Mutual labels:  home-assistant
gazpar-home-assistant
Retrieve Gazpar consumption in home assistant
Stars: ✭ 26 (-10.34%)
Mutual labels:  home-assistant
HomeAssistant
My Home Assistant Configuration
Stars: ✭ 71 (+144.83%)
Mutual labels:  home-assistant
meross pair
Android APP that allows pairing Meross Devices with third party MQTT brokers
Stars: ✭ 18 (-37.93%)
Mutual labels:  home-assistant
ical-sensor-homeassistant
an iCal Sensor for Home Assistant
Stars: ✭ 42 (+44.83%)
Mutual labels:  home-assistant
hass-pfsense
pfSense integration with Home Assistant
Stars: ✭ 44 (+51.72%)
Mutual labels:  home-assistant
compass-card
A Lovelace card that shows a directional indicator on a compass for Home Assistant
Stars: ✭ 64 (+120.69%)
Mutual labels:  home-assistant
home-assistant-custom-components
My custom components for Home Assistant
Stars: ✭ 70 (+141.38%)
Mutual labels:  home-assistant
home-assistant-glow
⚡ The power of energy measurements in your house
Stars: ✭ 383 (+1220.69%)
Mutual labels:  home-assistant
entur-card
Home Assistant Lovelace card card for the Entur public transport component.
Stars: ✭ 38 (+31.03%)
Mutual labels:  home-assistant
hass-actron
Actron Air Conditioner Add-On for Home Assistant
Stars: ✭ 14 (-51.72%)
Mutual labels:  home-assistant

k8s-gitops - Home Cloud via Flux v2 | GitOps Toolkit

GitOps state for my cluster using flux v2

Discord test renovate update-flux

K3S multi-arch highly available cluster installed via Ansible on Proxmox VMs.

The cluster is designed to allow tearing it completely without any data lost.

Stack is ordered in multiple layers (Flux kustomizations) depending on the lower one (example apps depend on infrasteructure).

HW setup

  • 3x Intel NUC 11 vPro (NUC11TNHv5) with:
    • 11th Gen Intel® Core™ i5-1145G7 @ 2.60GHz
    • 32 GB DDR4
    • 250 GB Sata SSD for local disks - 2x Samsung SSD 850 EVO, 1x CT240BX500SSD1
    • 500 GB NVME for Ceph - WDC WDS500G1B0C-00S6U0
    • 2 Thunderbolt 4/3 connected as network mesh for ceph:
      • Node 1, Port 1 <-> Node 2, Port 1
      • Node 1, Port 2 <-> Node 3, Port 1
      • Node 2, Port 2 <-> Node 2, Port 2

Installation

Install / Update / Uninstall

Installed via Ansible. It creates the VMs for the 3 nodes

The cluster is designed to allow tearing the cluster completly without any data lost.

Secret Management

Master secret is stored in Ansible Vault.

Kubernetes passwords and secrets encrypted with mozilla SOPS which it is supported out of the box in Flux2.

GPG key is deployed via Ansible. Its hash must be kept in sync with .sops.yaml.

Based on Vaskozl I use a pre-commit hook to ensure that secrets are never pushed unencrypted. The hook is deployed by running cd scripts; ./install_git_hooks.sh

To encrypt files with secrets use:

sops -e -i my-secret.yaml # Initial encrypt
sops my-secret.yaml # To edit it directly in you $EDITOR

Useful commands

  • Delete stuck objects (PVs, PVCs)

    kubectl patch <object type> <object name> -p '{"metadata":{"finalizers": []}}' --type=merge
    
  • Delete stuck NSs

    NAMESPACE=your-rogue-namespace
    kubectl proxy &
    kubectl get namespace $NAMESPACE -o json |jq '.spec = {"finalizers":[]}' >/tmp/patch.json
    curl -k -H "Content-Type: application/json" -X PUT --data-binary @/tmp/patch.json 127.0.0.1:8001/api/v1/namespaces/$NAMESPACE/finalize
    

🤝  Community

This cluster in inspired by the work of others shared at awesome-home-kubernetes, specially billimek´s setup.

There is also an active k8s@home Discord for this community.

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].