Uses https://github.com/PyratLabs/ansible-role-k3s so go and look there for variables to tweak.
Steps:
- Clone this repo
- Install ansible on your machine
- SSH into each machine and change the default password to something else
- Run
ansible-galaxy install xanmanning.k3s
to download the role - Edit
inventory.yml
to have your IP addresses - Run
ansible-playbook site.yml -i inventory.yml
- SSH into one of the machines and grab the kubeconfig from
/etc/rancher/k3s/k3s.yaml
(this is only accessible as root)
You'll need to change the IP address for the server in the kubeconfig from 127.0.0.1 to be one of your master nodes.