Octostar RKE2 K8s cluster installer with Ansible, based on the RKE2 Ansible Role by Labyrinth Labs.
-
The only supported OS on cluster nodes is Ubuntu 24.04.
-
Make sure to also follow the RKE2 Requirements before you start.
-
The RKE2 control plane nodes need ports 6443 and 9345 to be accessible by other nodes in the cluster.
-
Have an SSH key pair and have the public key added to the
authorized_keysfile on all the cluster nodes. -
Have your SSH private key stored somewhere on your machine (e.g. in
/path/to/key) and make sure it is readable only by the current user:chmod 600 /path/to/key -
Edit
ansible.cfgand set the path to your SSH private key:private_key_file = /path/to/key
-
Install Ansible (see Ansible docs for more information)
-
Add Ansible role:
ansible-galaxy install -r requirements.yml
-
Create a copy of the inventory
template.ini, name it<env>.ini(e.g.test.ini), and edit the file filling in the correct values (make sure to go through every section):cp inventories/template.ini inventories/test.ini -
Run the playbook
./deploy.sh test.ini -
If you have
kubectlinstalled on your machine, you can use the kubeconfig file inkubeconfs/test.yamlto connect to the cluster. Otherwise, you can use thekubectlcommand from any of the control plane nodes.kubectl --kubeconfig kubeconfs/test.yaml get nodes