Go to file
2025-05-03 02:35:14 +02:00
group_vars vm cluster 2025-05-03 02:35:14 +02:00
roles vm cluster 2025-05-03 02:35:14 +02:00
.gitignore node 2025-04-26 14:43:48 +02:00
init-cluster.yml joining cluster 2025-04-26 16:10:03 +02:00
inventory vm cluster 2025-05-03 02:35:14 +02:00
join-control-plane.yml joining cluster 2025-04-26 16:10:03 +02:00
join-workers.yml joining cluster 2025-04-26 16:10:03 +02:00
node.yml node 2025-04-26 14:43:48 +02:00
Readme.md vm cluster 2025-05-03 02:35:14 +02:00

Kubernetes cluster setup using Ansible for Debian

Description

The project configures a Kubernetes cluster on Debian machines with kubeadm.
It uses systemd-networkd for interface configuraition, CRI-O for containerization, Calico as a CNI plugin, and stacked etcd for control-plane database.

Configuration

Usage

1. Configure ssh on all nodes

  1. ssh in and enable root login by editing /etc/ssh/sshd_conf
  2. ssh-copy-key root@NODE
  3. ssh-agent $SHELL
  4. ssh-add

2. Add nodes to inventory

Edit the inventory file.

3. Prepare nodes

ansible-playbook -i inventory -u root node.yml

4. Initalize cluster

Uses the [first_master] group from the inventory to select the first master.

ansible-playbook -i inventory -u root init-cluster.yml

5. Join other masters

Uses the [other_masters] group from the inventory.
Do it ONE-by-ONE.

ansible-playbook -i inventory -u root join-control-plane.yml

6. Join workers

Uses the [workers] group from the inventory.
Do it ONE-by-ONE.

ansible-playbook -i inventory -u root join-workers.yml