Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xunholy/k8s-gitops

Kubernetes cluster powered by GitOps with FluxCD- Unified source of truth, automated workflows, declarative infrastructure, and cutting-edge DevOps practices.
https://github.com/xunholy/k8s-gitops

flux gitops k8s-at-home kubernetes linux renovate terraform

Last synced: about 2 months ago
JSON representation

Kubernetes cluster powered by GitOps with FluxCD- Unified source of truth, automated workflows, declarative infrastructure, and cutting-edge DevOps practices.

Awesome Lists containing this project

README

        

Raspbernetes

## Raspbernetes

My _Personal_ Kubernetes GitOps Repository

_... managed with Flux, Renovate and GitHub Actions_

[![Discord](https://img.shields.io/discord/673534664354430999?style=for-the-badge&label=discord&logo=discord&logoColor=white&color=blue)](https://discord.gg/k8s-at-home)
[![Kubernetes](https://img.shields.io/badge/Kubernetes-v1.29.4-blue?style=for-the-badge&logo=kubernetes&logoColor=white)](https://kubernetes.io/)
[![Linux](https://img.shields.io/badge/Talos-v1.7.1-blue?style=for-the-badge&logo=linux&logoColor=white)](https://kubernetes.io/)

# 🍼 Overview

This educational project is designed to provide a hands-on learning experience for mastering Kubernetes cluster configurations and best practices. The repository showcases a declarative implementation of a Kubernetes cluster, following GitOps principles that can be utilized with a variety of tools and workflows.

The main goal of this project is to demonstrate best practices for implementing enterprise-grade security, observability, and comprehensive cluster configuration management using GitOps in a Kubernetes environment, while fostering learning and growth in the Kubernetes community.

This repository leverages a range of cutting-edge open-source tools and platforms, forming a comprehensive technology stack that demonstrates the power of the [CNCF ecosystem](https://landscape.cncf.io/).

## 📖 Table of contents

- [🍼 Overview](#-overview)
- [📖 Table of contents](#-table-of-contents)
- [📚 Documentation](#-documentation)
- [📋 Requirements](#-requirements)
- [🚀 Quick Start](#-quick-start)
- [🔧 Hardware](#-hardware)
- [☁️ Cloud Services](#️-cloud-services)
- [🖥️ Technology Stack](#️-technology-stack)
- [🤖 Automation](#-automation)
- [🤝 Acknowledgments](#-acknowledgments)
- [👥 Contributing](#-contributing)
- [🚫 Code of Conduct](#-code-of-conduct)
- [💡 Reporting Issues and Requesting Features](#-reporting-issues-and-requesting-features)
- [📄 License](#-license)

## 📚 Documentation

- [Raspbernetes Docs](https://raspbernetes.github.io)
- [Kubernetes @Home Docs](https://k8s-at-home.com)

## 📋 Requirements

In order to effectively utilize this repository, it is important to have the following tools set up in your environment.

- [Kubernetes](https://kubernetes.io/) cluster
- [Flux](https://toolkit.fluxcd.io/get-started/) installed
- [Kustomize](https://kustomize.io/) installed
- [Taskfile](https://taskfile.dev/) installed

## 🚀 Quick Start

1. Set up the necessary environment variables:

```bash
export GITHUB_TOKEN=
export GITHUB_USER=
export GITHUB_REPO=
export CLUSTER=
```

2. Verify that your cluster satisfies the prerequisites:

```bash
flux check --pre
```

3. Run the bootstrap command to install Flux and deploy into the cluster:

```bash
task cluster CLUSTER_NAME=cluster-0
```

**Note:** *Many variables in the cluster depend on your specific configuration and should be modified accordingly. Be sure to review and adjust these variables as needed to match your environment and requirements.*

## 🔧 Hardware

| Device | Description | Quantity | CPU | RAM | Architecture | Operating System | Notes |
| -------------------------------------------------------------------------------------- | ------------------------ | -------- | ------- | -------- | ------------ | ------------------------------------- | ----- |
| [Protectli FW6E](https://protectli.com/product/fw6e/) | Router | 1 | 4 Cores | 16GB RAM | AMD64 | [VyOs](https://vyos.io/) | |
| [Protectli VP2410 ](https://protectli.com/product/vp2410/) | Kubernetes Control Plane | 3 | 4 Cores | 8GB RAM | AMD64 | [Talos Linux](https://www.talos.dev/) | |
| [Protectli FW2B](https://protectli.com/product/fw2b/) | Kubernetes Node(s) | 3 | 2 Cores | 8GB RAM | AMD64 | [Talos Linux](https://www.talos.dev/) | |
| [Raspberry Pi 4 Model B](https://www.raspberrypi.org/products/raspberry-pi-4-model-b/) | Kubernetes Node(s) | 4 | 4 Cores | 8GB RAM | ARM64 | [Talos Linux](https://www.talos.dev/) | |
| [Rock Pi 4 Model C](https://rockpi.org/rockpi4#) | Kubernetes Node(s) | 6 | 4 Cores | 4GB RAM | ARM64 | [Talos Linux](https://www.talos.dev/) | |

## ☁️ Cloud Services

Although I manage most of my infrastructure and workloads on my own, there are specific components of my setup that rely on cloud services.

| Service | Description | Cost (AUD) |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -------------- |
| [Cloudflare](https://www.cloudflare.com/) | I use Cloudflare in my home network for DNS management and to secure my domain with Cloudflare's services. | ~$69/yr |
| [GCP](https://cloud.google.com/) | I use Google Cloud Platform (GCP) to manage backups using Google Cloud Storage (GCS) and employ GCP's OAuth for authentication. | ~20/mo |
| [GitHub](https://github.com/) | I use GitHub for code management and version control, enabling seamless collaboration in addition to OAuth for authentication | Free |
| [NextDNS](https://nextdns.io/) | I use NextDNS for malware protection and ad-blocking for a safer browsing experience. | ~$30/yr |
| [UptimeRobot](https://uptimerobot.com/) | I use UptimeRobot to monitor my home services for uninterrupted performance. | ~$84/yr |
| [Lets Encrypt](https://letsencrypt.org/) | I use Let's Encrypt to generate certificates for secure communication within my network. | Free |
| | | Total: ~$35/mo |

## 🖥️ Technology Stack

The below showcases the collection of open-source solutions currently implemented in the cluster. Each of these components has been meticulously documented, and their deployment is managed using FluxCD, which adheres to GitOps principles.

The Cloud Native Computing Foundation (CNCF) has played a crucial role in the development and popularization of many of these tools, driving the adoption of cloud-native technologies and enabling projects like this one to thrive.

| | Name | Description |
| --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
| | [Kubernetes](https://kubernetes.io/) | An open-source system for automating deployment, scaling, and management of containerized applications |
| | [FluxCD](https://fluxcd.io/) | GitOps tool for deploying applications to Kubernetes |
| | [Talos Linux](https://www.talos.dev/) | Talos Linux is Linux designed for Kubernetes |
| | [Cilium](https://cilium.io/) | GitOps tool for deploying applications to Kubernetes |
| | [Istio](https://istio.io/) | Istio extends Kubernetes to establish a programmable, application-aware network using the powerful Envoy service proxy. |
| | [containerd](https://containerd.io/) | Container runtime integrated with Talos Linux |
| | [CoreDNS](https://coredns.io/) | A DNS server that operates via chained plugins |
| | [MetalLB](https://metallb.universe.tf/) | Load-balancer implementation for bare metal Kubernetes clusters, using standard routing protocols. |
| | [Prometheus](https://prometheus.io) | Monitoring system and time series database |
| | [Jaeger](https://jaegertracing.io) | Open-source, end-to-end distributed tracing for monitoring and troubleshooting transactions in complex distributed systems |
| | [Helm](https://helm.sh) | The Kubernetes package manager |
| | [Falco](https://falco.org) | Container-native runtime security |
| | [Flagger](https://flagger.app/) | Progressive delivery Kubernetes operator (Canary, A/B Testing and Blue/Green deployments) |
| | [Open Policy Agent](https://openpolicyagent.org) | An open-source, general-purpose policy engine |
| | [Kyverno](https://kyverno.io/) | Kubernetes Native Policy Management |
| | [Dex](https://github.com/dexidp/dex) | An identity service that uses OpenID Connect to drive authentication for other apps |
| | [Crossplane](https://crossplane.io/) | Manage any infrastructure your application needs directly from Kubernetes |
| | [Litmus](https://litmuschaos.io) | Chaos engineering for your Kubernetes |
| | [OpenEBS](https://openebs.io) | Container-attached storage |
| | [OpenTelemetry](https://opentelemetry.io) | Making robust, portable telemetry a built in feature of cloud-native software. |
| | [Thanos](https://thanos.io) | Highly available Prometheus setup with long-term storage capabilities |
| | [Cert Manager](https://cert-manager.io/) | X.509 certificate management for Kubernetes |
| | [Grafana](https://grafana.com) | Analytics & monitoring solution for every database. |
| | [Loki](https://grafana.com/oss/loki/) | Horizontally-scalable, highly-available, multi-tenant log aggregation system |
| | [Velero](https://velero.io/) | Backup and restore, perform disaster recovery, and migrate Kubernetes cluster resources and persistent volumes. |

## 🤖 Automation

This repository is automatically managed by [Renovate](https://renovatebot.com/). Renovate will keep all of the container images within this repository up to date automatically. It can also be configured to keep Helm chart dependencies up to date as well.

## 🤝 Acknowledgments

A special thank you to everyone in the Kubernetes @Home Discord community for their valuable contributions and time. Much of the inspiration for my cluster comes from fellow enthusiasts who have shared their own clusters under the k8s-at-home GitHub topic.

Also I extend heartfelt thanks to all CNCF contributors for their dedication and expertise, as their collective efforts have been vital in driving innovation and success within the cloud-native ecosystem.

For more ideas on deploying applications or discovering new possibilities, be sure to explore the [Kubernetes @Home search](https://nanne.dev/k8s-at-home-search/) search.

## 👥 Contributing

Our project welcomes contributions from any member of our community. To get started contributing, please see our [Contributor Guide](.github/CONTRIBUTING.md).

### 🚫 Code of Conduct

By participating in this project, you are expected to uphold the project's [**Code of Conduct**](.github/CODE_OF_CONDUCT.md). Please report any unacceptable behavior to the repository maintainer.

### 💡 Reporting Issues and Requesting Features

If you encounter any issues or would like to request new features, please create an issue on the repository's issue tracker. When reporting issues, include as much information as possible, such as error messages, logs, and steps to reproduce the issue.

Thank you for your interest in contributing to this project! Your contributions help make it better for everyone.

## 📄 License

This repository is [Apache 2.0 licensed](./LICENSE)