This repository contains a set of scripts to create a disposable kubernetes cluster on one of supported cloud providers.

This project is intended to be used as a playground for testing and learning purposes. It is not intended to be used in production.
It was created in the way that should support extending it with new cloud providers and new applications.
Currently supported bootstrap options:
- DigitalOcean
- kind - not a cloud provider, but a tool to create a kubernetes cluster on a local machine
Additionally, to simplify access to the cluster, we are deploying external-dns and cert-manager to the cluster.
Those two controllers will be used to automatically create DNS records and TLS certificates for the ingress resources in the cluster.
The following applications (controllers) are deployed to the cluster by default:
- ArgoCD - a declarative, GitOps continuous delivery tool for Kubernetes
- cert-manager - used to automatically create TLS certificates for the ingress resources
- external-dns - used to automatically create DNS records for the ingress resources
- traefik - used as an ingress controller (can be replaced by ingress-nginx)
The following applications can be deployed by enabling them in the deploy/terraform.tfvars
:
- ingress-nginx - used as an alternative ingress controller
- gitlab-runner - used to run CI/CD pipelines in gitlab
- OpenTofu - used to create the cluster and deploy default applications
- tfswitch - used to ensure that the correct version of tofu is used
- GNU make - used to orchestrate the deployment
- kubectl - used to interact with the cluster
- direnv - used to automatically load environment variables from
.env
or.envrc
files
To start using the project, copy the .env.example
file to .env
and adjust in the required values.
cp .env.example .env
This mostly includes sensitive configuration.
The remaining configuration can be found in the deploy/terraform.tfvars
file.
To set up a temporary kubernetes cluster, including infrastructure and common services run:
make bootstrap
To destroy ephemeral kubernetes cluster run:
make destroy
To stop kind cluster run:
make stop
To start kind cluster run:
make start
Contributions are welcome! Feel free to submit a pull request. For major changes, please open an issue first to discuss.