Deploy a Multiple Control Plane Kubernetes Cluster on ThreeFold Grid in Minutes
Hello dear ThreeFold users,
I’m glad to present a new open-source project that makes deploying enterprise-grade Kubernetes clusters on the ThreeFold Grid incredibly simple. The TFGrid-K3s project automates the entire deployment process, from infrastructure provisioning to cluster configuration.
What Makes This Special?
-
Flexible Control Plane Architecture: Deploy with X control plane nodes for true high-availability Kubernetes (e.g. 3 control plane nodes)
-
Scalable Worker Nodes: Add Y worker nodes as needed for your workloads, completely customizable (e.g. 5 worker nodes)
-
Fully Automated: Single command deployment with zero manual configuration
-
Security-First Design: Implements best practices for handling sensitive credentials
-
WireGuard Integration: Secure network overlay between all nodes
-
Infrastructure as Code: Everything defined with OpenTofu (Terraform fork) and Ansible
How It Works
The deployment process is simple:
-
Clone the repository
-
Set your configuration variables (node IDs, sizing, SSH key)
-
Securely set your ThreeFold mnemonic as an environment variable
-
Run the whole deployment with one command (
bash deploy.sh
)
That’s it! In a few minutes, you’ll have a production-ready Kubernetes cluster running on distributed ThreeFold nodes.
Why Deploy Kubernetes on ThreeFold?
-
True Decentralization: Your clusters run on hardware running on the TFGrid
-
Sovereign Infrastructure: Full control over your computing resources
-
Cost-Effective: Pay only for the resources you use, without cloud provider markups
Complete Process
The complete deployment process is presented below.
# Clone the repository
git clone https://github.com/mik-tf/tfgrid-k3s
cd tfgrid-k3s
# Configure your deployment
cp infrastructure/credentials.auto.tfvars.example infrastructure/credentials.auto.tfvars
nano infrastructure/credentials.auto.tfvars
# Set your mnemonic securely
set +o history
export TF_VAR_mnemonic="your_actual_mnemonic_phrase"
set -o history
# Deploy!
cd scripts
bash deploy.sh
Real-World Use Cases
This deployment is robust enough for various production workloads:
-
Web Applications: Deploy your web services with high availability
-
Data Processing: Run distributed data workloads
-
Development Environments: Create isolated dev/test environments
-
Blockchain Nodes: Run validators and nodes with Kubernetes orchestration
Community Feedback
Please share your experiences, suggest improvements, or contribute to the codebase. The repository is available at github.com/mik-tf/tfgrid-k3s.
Getting Help
If you encounter any issues or have questions, feel free to:
-
Open an issue on GitHub
-
Ask in this forum thread
-
Check the troubleshooting guide in the repository
Thanks for reading and I wish you a happy cluster!