KubeForge is a Go-based tool for automating Kubernetes cluster installation and setup on Linux systems. It provides a simple, interactive way to bootstrap both control plane and worker nodes.
- Automatic detection of Linux distribution
- Support for Debian and RedHat based distributions
- Containerd runtime installation and configuration
- Kubernetes control plane initialization
- Calico network plugin installation
- Optional Kubernetes Dashboard installation
- Worker node join command generation
- High-availability cluster setup
- Node joining (both worker and control plane nodes)
- Node labeling and tainting
- Cluster upgrade capabilities
- Cluster status checking
- robust configuration options
When setting up a control plane node, KubeForge will:
- Install and configure containerd
- Install Kubernetes components (kubeadm, kubelet, kubectl)
- Initialize the Kubernetes control plane
- Install the Calico network plugin
- Generate a join command for worker nodes
- Optionally install the Kubernetes Dashboard
When setting up a worker node, KubeForge will:
- Install and configure containerd
- Install Kubernetes components
- Prompt for the join command from the control plane
- Join the node to the cluster
KubeForge supports high availability setups with multiple control plane nodes. When configuring a high availability cluster:
- Set up a load balancer in front of the API servers
- Configure the first control plane node with the load balancer endpoint
- Join additional control plane nodes using certificate key
git clone https://github.com/ochestra-tech/kubeforge.git
cd KubeForge
make build
sudo make installThis is more practical approach that uses Docker only as a build environment, producing a standalone binary that can be run directly on the host system. This addresses security concerns while leveraging containerization for consistent builds.
KubeForge provides a containerized build environment that produces standalone binaries for direct use on the host system. This approach avoids running privileged containers while still leveraging Docker for consistent builds.
-
Secure: No need for privileged containers at runtime
-
Portable: Builds binaries for multiple architectures
-
Consistent: Same build environment regardless of host OS
-
Simple: Easy installation process using generated script
-
Flexible: Can run directly on the host with full access to system resources
-
CI/CD friendly: Easy to integrate into build pipelines
a. Build the binaries:
./scripts/docker-build.shb. Install KubeForge on the host system:
./scripts/install-host.shc. Run KubeForge
kubeforgeIf you prefer to build and install KubeForge manually:
- Build the binary:
go build -o kubeforge cmd/kubeforge/main.go- Install it
sudo cp kubeforge /usr/local/bin/
sudo mkdir -p /usr/local/lib/kubeforge/assets
sudo cp -r assets/* /usr/local/lib/kubeforge/assets/
sudo chmod +x /usr/local/bin/kubeforge# Build the binaries
./build.sh
# Install KubeForge on the host system
./install-host.sh
# Run KubeForge
kubeforgescripts/k8s-cluster-setup is the batch script version of this go cluster creation tool
- Save the script to a file (e.g., setup-kubernetes.sh)
- Make it executable: chmod +x setup-kubernetes.sh
- Run it as root: sudo ./setup-kubernetes.sh
- First run the script on the machine you want to be the master node
- When prompted, indicate it's a master node
- Save the join command that is generated
- Run the script on each worker node
- When prompted, indicate it's not a master node
- Run the join command you saved earlier on each worker node
After completing these steps, you'll have a functional Kubernetes cluster with networking configured and ready to deploy applications.