cluster-ansible/Readme.md
2025-05-03 02:35:14 +02:00

1.3 KiB

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