The name comes from a silly portmanteau between kube and m1k (my nickname)
This repository contains the Terraform code for deploying and managing a homelab k8s infrastructure.
The Kub1k project aims to provide a scalable and reliable Kubernetes cluster using the K3s lightweight Kubernetes distribution. The infrastructure is provisioned using Terraform and includes the following components:
- ArgoCD: A GitOps continuous delivery tool for Kubernetes.
- External Secrets: A controller for managing secrets stored in external secret management systems.
- Cilium: Networking and security layer, provides both networking capabilities, such as load balancing and routing, and security features like network policies and endpoint protection.
- Nginx Ingress Controller: An Ingress controller for Kubernetes using Nginx.
- Vault: A secrets management tool for securely storing and accessing sensitive information.
- Github Runners: Runner scale sets is a group of homogeneous runners that can be assigned jobs from GitHub Actions.
Before deploying the infrastructure, make sure you have the following prerequisites:
- Terraform: Version >= 1.0.0
- Helm: Version >= 3.0.0
- Kubernetes: Version >= 1.21.0
- Vault: Version >= 1.7.0
To deploy the infrastructure, follow these steps:
- Clone this repository to your local machine.
- Navigate to the project directory.
- Initialize the Terraform backend by running
make init kub1k
. - Review and modify the variables in the
variables.tf
file according to your environment. - Run
make plan kub1k
to see the execution plan. - Run
make apply kub1k
to deploy the infrastructure.
For more detailed instructions, please refer to the Terraform documentation.
The ArgoCD applications included in this project are:
-
Cert-Manager
-
External-Secrets-Operator
-
Lets-Encrypt-Issuers
-
Kube-Prometheus-Stack
-
Secrets
-
Synology-CSI
The Helm charts included in this project are:
-
ArgoCD-App-of-Apps: Deploys an ArgoCD application that references other ArgoCD applications, allowing you to manage multiple applications in a centralized manner.
-
Lets-Encrypt-Issuers: Necessary resources for setting up Let's Encrypt issuers in cert-manager.
-
Secrets: Secrets in your Kubernetes cluster, including the Cloudflare API key for cert-manager, ClusterSecretStore, and Synology CSI client info secret.
This project is licensed under the MIT License.
The grafana dashboards are based on the followings projects: