Infrastructure repository for my cloud-lab
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.
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 |
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
- 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
So far this is not supported out of the box. Provisioning is handled by Terraform, but some resources need to be created manually.
cd k0s
k0sctl apply -c k0sctl.yaml
cd terraform
terraform init
terraform apply --var-file=cloudlab.tfvars
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