Skip to content

Latest commit

 

History

History
68 lines (48 loc) · 2.83 KB

README.md

File metadata and controls

68 lines (48 loc) · 2.83 KB

Automating RKE2 Cluster Setup with Vagrant and Ansible Playbook

rke2

Requirements

Before running the playbook, make sure you have the following requirements installed:

  • Ansible: Ansible is an open-source automation tool used for configuration management and application deployment. You can install Ansible by following the instructions in the official Ansible documentation.
  • Vagrant: You can download and install Vagrant from the official website. Ensure that Vagrant is properly installed and available in your system's PATH.
  • Vagrant Plugin: Install the vagrant-env plugin by running the following command:
vagrant plugin install vagrant-env

The vagrant-env plugin allows Vagrant to load environment variables from a .env file, which is used to customize the Vagrant configuration.

Quick Start

To quickly get started with the RKE2 cluster setup using Vagrant, follow these steps:

git clone https://github.com/sylvain-pierrot/playbook-rke2-vagrant.git
cd playbook-rke2-vagrant
vagrant up --no-parallel

The --no-parallel flag ensures that the provisioning is done sequentially instead of in parallel, which can help avoid any potential resource conflicts.

⚠️ Playbook execution requires the sudo password, granting the necessary privileges to perform provisioning tasks. A prompt will be requested when the playbook is launched.

Once the provisioning process is complete, you will have your RKE2 cluster up and running.

The kubeconfig file for the cluster will be created at the root of the project. You can use the following command to interact with the cluster using kubectl:

kubectl --kubeconfig ./kubeconfig [command]

Replace [command] with the desired kubectl command.

Delete Cluster

To delete the RKE2 cluster, run the following command:

vagrant destroy --force

Tech stack

bash kubernetes vagrant ansible