"Production-grade" is a loaded term. What constitutes production readiness will vary according to your use case. While a Kubernetes cluster is production-ready the moment it is ready to serve traffic, there is a commonly agreed set of minimum requirements, as shown in the infographic below.
The k8s-finstrap project is a customizable and extendable framework that aims to solve this problem by leveraging
- Terraform: Compose a production ready infrastructure on Kubernetes
- Vault: Kubernetes clusters with the power of Vault and dynamic secrets
- Argo CD: Application configuration management and delivery using GitOps
This project integrates popular battle-tested open-source software and solutions that provide a production-grade out-of-box Kubernetes experience.
├── LICENSE
├── README.md
├── argocd # Argo CD configurations (optional)
├── finstrap # cluster finstrap using Argo CD
├── docs # documents and assets
├── infrastructure # infrastructure automation using Terraform
Follow the below steps to get started:
optional deployment Kubernetes single-node
./install-script.sh
-
Clone this repo and change the directory to
infrastructure
-
Initialize Terraform backend:
export KUBE_CONFIG_PATH=~/.kube/config cd infrastructure terraform init
-
Copy and rename the
finstrap.tfvars.backup
file tofinstrap.tfvars
:cp finstrap.tfvars.backup finstrap.tfvars
-
Open the
finstrap.tfvars
file and adjust settings according to your needs using a text editor of your choice (preferably with HCL lint support). -
Use
terraform plan
to inspect infra changes before applying:terraform plan -var-file=finstrap.tfvars -out tf-finstrap.out
-
If you're happy with the changes, issue
terraform apply
:
Had fun trying out the k8s-finstrap? Time to say goodbye!
# Run
cd infrastructure
terraform destroy --var-file=finstrap.tfvars --auto-approve
# Bye Bye!