Go to file
2024-11-23 22:46:13 +01:00
group_vars init 2024-11-23 22:46:13 +01:00
roles init 2024-11-23 22:46:13 +01:00
inventory init 2024-11-23 22:46:13 +01:00
master-primary.yml init 2024-11-23 22:46:13 +01:00
master-secondary.yml init 2024-11-23 22:46:13 +01:00
node.yml init 2024-11-23 22:46:13 +01:00
Readme.md init 2024-11-23 22:46:13 +01:00
workers.yml init 2024-11-23 22:46:13 +01:00

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