/ansible-rke2-deployment

RKE2 deployment with Ansible

Primary LanguageJinjaMIT LicenseMIT

Ansible

This playbook allow you to deploy Ubuntu 22.04 VMs to Vsphere and configure them as k8s nodes.

Dualstack, IPv6 prefer, keepalived.

RKE2, MetalLB, Rancher.

Upgrade possible, but not tested. New node addining possible, but not tested.

Preparing env to run ansible

  1. Clone repository to your local machine

  2. Open repository directory and run prepare-environment.pl, like next

    ./prepare-environment.pl
  3. When environment will be ready you will see Virtual environment successfully prepeared. in console

  4. Run playbook with run_playbook.sh script, like next

    ./run_playbook.sh -i inventory/<inventory file> <playbook yml file>

Customization

Common details

Ubuntu VMs configuration

RKE2 Details

K8S mainfests

Note: Need to update roles/rke2/vars/common/rke2.yml after adding new manifest

Run deploymetn

Deploy VMs:

./run_playbook.sh -i inventories/main/ -i inventories/devel/rke2-devel-0.yml deploy-rke2-cluster-devel.yml

Deploy k8s:

./run_playbook.sh -i inventories/main -i inventories/devel/rke2-devel-0.yml deploy-rke2-nodes-devel.yml

License

MIT

External Author Information

RKE part based on Labyrinth Labs.