Skip to content

Latest commit

 

History

History
69 lines (49 loc) · 2.7 KB

README.md

File metadata and controls

69 lines (49 loc) · 2.7 KB

Provisioning of Kubernetes the hard way with Ansible

OpenSSF best practices badge openssf scorecards Quality Gate Status

Description

This educational project is a comprehensive toolkit designed to automate and simplify the process of provisioning a Kubernetes cluster "the hard way". It combines the use of Vagrant, Ansible, and Taskfile to create a streamlined workflow for setting up and managing Kubernetes clusters.

The project includes a Vagrantfile for setting up the necessary virtual machines, a directory full of Ansible playbooks and tasks for installing and managing Kubernetes, and a Taskfile for orchestrating these processes. The Ansible playbooks are based on the Kubernetes setup guides by Kelsey Hightower and Mumshad Mannambeth, but have been adapted and expanded upon for this project.

This toolkit is particularly useful for developers or system administrators who are learning about Kubernetes and want a hands-on approach, or who frequently need to set up Kubernetes clusters for testing or deployment purposes.

Credits

This project is based on these two repositories:

But for a better understanding of the material, I decided to redo everything in my own way.

Prerequisites

Tools

Working with Taskfile

# List all tasks
task --list

# Describe a task
task --summary <task-name>

All tasks have a short description of what they do. And long summaries are available with the --summary flag.

Working with uv

# Install all python dependencies
task install

# To run the playbook you can use the following command
task play -- ansible/connection.yml
# It's using venv inside the script, so you don't need to activate it

# To run another ansible command you need to activate the venv and run the command
source .venv/bin/activate
# For example
ansible-inventory --list all | bat -l json