687 B
687 B
K3S cluster deployment using Ansible
Setup a K3S cluster on Debian servers.
How to use
First, edit the inventory file and set the k3s token in group_vars/all.yml
.
Then:
# allow ansible to use the ssh key
ssh-agent $SHELL
ssh-add ~/.ssh/id_rsa
# setup nodes
ansible-playbook -i inventory -u root node.yml
# create primary master
ansible-playbook -i inventory -u root master-primary.yml
# create more masters
ansible-playbook -i inventory -u root master-secondary.yml
# create workers
ansible-playbook -i inventory -u root workers.yml
Features
- static IP using systemd-networkd (using the last IP of the server before running the playbook)
- multiple masters