Skip to content

Automating RKE2 Cluster Setup with Vagrant and Ansible Playbook

Notifications You must be signed in to change notification settings

sylvain-pierrot/playbook-rke2-vagrant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Automating RKE2 Cluster Setup with Vagrant and Ansible Playbook

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published