kerbaras / cloudlab

Infrastructure repository for my cloud-lab

Home Page:https://home.kerbaras.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cloudlab

Infrastructure repository for my cloud-lab

Overview

Infrastructure as Code for my cloud-based lab. This repository contains provisioning and configuration definitions in Terraform and Kustomization for a Kubernetes Cluster Environment.

Important

This project is still in the experimental stage and it's used to run experiments and learn new technologies. It's not intended to be used in production environments. For more information check the roadmap.

Technology Stack

Logo Name Description
Terraform Infrastructure as Code
Kubernetes Container Orchestration
Kustomize Kubernetes Configuration Management
Helm Kubernetes Package Manager
ArgoCD GitOps Continuous Delivery
Cert-Manager Kubernetes Certificate Management
k0s Kubernetes Distribution
Longhorn Kubernetes Storage Orchestration
MetalLB Kubernetes Load Balancer
Emissary Ingress Kubernetes API Gateway
Linkerd Kubernetes Service Mesh
Prometheus Kubernetes Monitoring
Grafana Kubernetes Observability
Loki Kubernetes Log Aggregation
Homer Kubernetes Dashboard
Portainer Kubernetes Dashboard

Hardware

So far the lab is running on Hertzner with the following nodes:

  • AX41-NVMe:
    • CPU: AMD Ryzen 5 3600 6-Core
    • RAM: 64 GB DDR4
    • Storage: 2 x 512 GB NVMe SSD

Features

  • Kubernetes Cluster: Using k0s as Kubernetes distribution
  • GitOps Continuous Delivery: Using ArgoCD as GitOps Continuous Delivery
  • Application Dashboard: Using Homer
  • Kubernetes Dashboard: Using Portainer
  • Single Sign-On: Using Zitadel
    • Kubernetes OIDC Authentication
    • Private Application Authentication
    • Private Docker Registry Authentication
  • Kubernetes Storage Orchestration: Using Longhorn
  • Monitoring and Alerting
  • Virtual Private Network
  • NAT Load Balancer
  • Virtual Private Cloud
  • Virtual Machine Orchestration

Getting Started

So far this is not supported out of the box. Provisioning is handled by Terraform, but some resources need to be created manually.

Bootstrap the Cluster

cd k0s
k0sctl apply -c k0sctl.yaml

Provisioning Infrastructure

cd terraform
terraform init
terraform apply --var-file=cloudlab.tfvars

Deploying Applications

Applications are handled by ArgoCD. To deploy an application, create a new folder under apps/{my-app} and add a kustomization.yaml file. Then add the application to the applications.tf file and deploy it using terraform.

The app folder follows the following structure:

apps
└── my-app
    ├── base
    │   ├── kustomization.yaml
    │   └── deplyment.yaml
    └── overlays
        ├── dev
        │   ├── kustomization.yaml
        │   └── app.env
        └── prod
            ├── kustomization.yaml
            └── app.yaml

About

Infrastructure repository for my cloud-lab

https://home.kerbaras.com

License:MIT License


Languages

Language:HCL 79.6%Language:CSS 20.4%