Tutorialrke2spray
Get started with rke2spray
Prepare the repository, validate an Inventory, and converge the first RKE2 cluster.
Core summary
- Root Playbooks in a source checkout are the canonical execution path.
- An Inventory must define Linux hosts, role groups, RKE2 tokens, and the endpoint mode.
- Both
inventory-vault-checkandinventory-preflightmust pass before the first change. - Install through
cluster.ymlor the equivalentmake cluster-convergecontract. - Completion requires healthy RKE2 services, the Kubernetes API, and Ready Nodes.
Verify the prerequisites
- Choose an Ansible, Python, operating-system, and RKE2 combination from the current release's
docs/support-matrix.md. - Target hosts must allow SSH, privilege escalation, and the required node-to-node ports.
- A multi-server topology needs a stable registration endpoint before installation.
Converge the first cluster
Prepare the repository and dependencies
git clone https://github.com/jongminchung/rke2spray.git cd rke2spray python -m pip install -r requirements.txt ansible-galaxy collection install -r requirements.ymlCopy the sample Inventory into an environment directory
cp -a inventory/sample inventory/my-clusterUpdate
hosts.yml,group_vars/, and requiredhost_vars/with the real addresses and topology.Validate Vault and Inventory without changing hosts
make inventory-vault-check \ INVENTORY=inventory/my-cluster/hosts.yml \ VAULT_PASSWORD_FILE=.vault_pass make inventory-preflight \ INVENTORY=inventory/my-cluster/hosts.yml \ VAULT_PASSWORD_FILE=.vault_passConverge the cluster
ansible-playbook \ -i inventory/my-cluster/hosts.yml \ --vault-password-file .vault_pass \ cluster.ymlVerify the result
make cluster-health \ INVENTORY=inventory/my-cluster/hosts.yml \ VAULT_PASSWORD_FILE=.vault_pass
Confirm the completion state
- Each Linux node must run the expected active
rke2-serverorrke2-agentservice. - The Kubernetes API
/readyzendpoint must return successfully. - Every Node declared in Inventory must report
Ready. - The selected CNI and CoreDNS rollout must complete.
Next step
- Review topology and adapter boundaries in Architecture.
- Read the safety boundaries in Operations before production changes.