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.

  1. The flow
  2. Where each distribution runs
  3. Requirements
  4. Node sizing
  5. CLI basics

The flow

  1. Install the tools and create .env: ./scripts/setup.sh env init, then env check.
  2. Prepare the hosts: Vagrant VMs or a VPS, plus the Ansible inventory. See Prepare hosts.
  3. Review the configuration in master.yaml: ./scripts/setup.sh config show and config --list.
  4. Create the cluster: Kind, K3s or RKE2.
  5. 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 networkForwarding enabled, Kind creates socat-netforward-port-80/443 systemd services that bind host ports 80/443, so run ./scripts/setup.sh kind destroy when you finish. K3s and RKE2 install system services, write /etc/rancher and 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-run to any setup, ha-setup, destroy or utils command to print the exact ansible-playbook command without running it.

The full command reference is in setup.sh CLI.


Table of contents


Back to top

Kubewekend is a learning and lab project: it is not hardened for production. Charts are served from this site: helm repo add kubewekend https://kubewekend.xeusnguyen.xyz