Getting started with Kubewekend
Kubewekend runs from an Ansible controller (your machine) and builds the cluster on target hosts: Vagrant VMs or a remote VPS over SSH. Every step goes through one CLI, ./scripts/setup.sh, so you never call ansible-playbook or vagrant yourself.
The flow
- Install the tools and create
.env:./scripts/setup.sh env init, thenenv check. - Prepare the hosts: Vagrant VMs or a VPS, plus the Ansible inventory. See Prepare hosts.
- Review the configuration in
master.yaml:./scripts/setup.sh config showandconfig --list. - Create the cluster: Kind, K3s or RKE2.
- Add utilities with tags, then verify with the built-in test deployments. See Utilities.
Where each distribution runs
| Distribution | Local | VM (Vagrant) | VPS (SSH) |
|---|---|---|---|
| Kind (Kubernetes in Docker) | ✅ | ✅ | ✅ |
| K3s standalone | ❌ | ✅ | ✅ |
| K3s high availability | ❌ | ✅ | ✅ |
| RKE2 standalone | ❌ | ✅ | ✅ |
| RKE2 high availability | ❌ | ✅ | ✅ |
[!WARNING]
Using your own machine as the target (Local) is only supported for Kind, and still not recommended: with
networkForwardingenabled, Kind createssocat-netforward-port-80/443systemd services that bind host ports 80/443, so run./scripts/setup.sh kind destroywhen you finish. K3s and RKE2 install system services, write/etc/rancherand change host networking.
Not sure which one to pick? Read When to use K3s and RKE2 (SUSE) or the lightweight Kubernetes guide (dev.to).
Requirements
| Tool | Required | Purpose |
|---|---|---|
| VirtualBox | For VMs | VM provider |
| Vagrant | For VMs | VM provisioning |
| Ansible | Yes | Cluster orchestration |
| kubectl | Yes | Kubernetes CLI |
| Helm | Yes | Chart management |
| Docker | Kind only | Runs the Kind nodes (also installed by the playbook on the target) |
| jq | Optional | JSON processing |
For a remote VPS you only need Ansible and SSH access; VirtualBox and Vagrant are for local VMs.
chmod +x ./scripts/setup.sh
# creates .env from template.env: set SSH_USER and SSH_KEY
./scripts/setup.sh env init
# verifies the tools above
./scripts/setup.sh env check
Node sizing
A node with too little memory fails during bootstrap or gets killed (Error 137).
| Node | Distribution | Minimum | Recommended |
|---|---|---|---|
| Master (control plane) | RKE2 | 2 CPU, 2 GB RAM (lower fails) | 2 CPU, 3 GB RAM |
| Master (control plane) | K3s | 1 CPU, 1 GB RAM | 2 CPU, 2 GB RAM |
| Master (control plane) | Kind | 1 CPU, 1 GB RAM | 2 CPU, 2 GB RAM |
| Worker | K3s / RKE2 | 1 CPU, 1 GB RAM | 1 GB RAM or more |
The Vagrantfile defaults to 2 CPU / 3 GB for masters and 1 CPU / 1 GB for workers. Utilities such as monitoring, GitOps and security need more: raise config.memory / config.cpus for those labs.
CLI basics
# all commands
./scripts/setup.sh help
# help for one command
./scripts/setup.sh <command> help
# project-wide dashboard
./scripts/setup.sh status
# the current master.yaml as a table
./scripts/setup.sh config show
# supported / in-development options and current values
./scripts/setup.sh config --list kind
[!TIP]
Add
--dry-runto anysetup,ha-setup,destroyorutilscommand to print the exactansible-playbookcommand without running it.
The full command reference is in setup.sh CLI.