This repository provides a fully automated Vagrant-based environment for deploying RKE2, Rancher's Kubernetes distribution, in either a single-node control plane or a high-availability (HA) control plane configuration. In HA mode, the control plane spans three nodes and uses kube-vip for virtual IP failover and leader election. You can also customize the number of worker nodes and network settings, making this setup ideal for local testing, development, and experimentation.
- Deploy RKE2 with either:
- A single-node control plane (no VIP, lightweight setup)
- A three-node HA control plane with kube-vip
- Automatically provisions control plane and worker nodes
- Configurable number of worker nodes
- Customizable CPU, memory, and network settings via
settings.yaml
Edit the file to match your desired topology and network.
vagrant upThis will:
- Create the required folders
- Provision each node with its role (control plane or worker)
- Configure networking and kube-vip
- Wait for ingress controller health before removing bootstrap IP
After provisioning, you can access the cluster using:
vagrant ssh node1
kubectl get nodesTo destroy all VMs and remove resources:
vagrant destroy -f- VIP is assigned to
eth1and used for control plane bootstrapping. - The script waits for both kube-vip and ingress-nginx to be healthy before removing the temporary
/24IP. - You can customize the kube-vip manifest and RBAC files in
files/.
MIT License. See LICENSE file for details.