K3s Lab Automation

Ansible automation for deploying and managing a K3s Kubernetes cluster with Ansible Automation Platform.

Overview

Infrastructure-as-Code project that automates the provisioning, configuration, and management of a multi-node Kubernetes cluster and Ansible Automation Platform (AAP) instance. This project demonstrates modern DevOps practices with Ansible playbooks and shell scripts.

Role

Owner - Designed and implemented the automation framework

Technologies

  • Ansible playbooks and roles
  • Shell scripts (Bash)
  • Ansible Automation Platform (AAP) 2.6
  • K3s Kubernetes
  • Ubuntu and RHEL 10
  • Ansible Vault for secrets management

Repository

GitHub: k3s-lab-automation

Screenshot

K3s Lab Automation Screenshot

Architecture

  • Automation Controller: AAP 2.6 (Containerized on RHEL 10)
  • Kubernetes Cluster: 4-node K3s cluster (1 master, 3 workers)
  • Operating Systems: RHEL 10 for AAP, Ubuntu for K3s nodes

Key Features

  • Automated AAP deployment with shell scripts
  • K3s cluster provisioning with Ansible playbooks
  • OS preparation and hardening
  • Secure credential management with Ansible Vault
  • Modular playbook design for reusability

This project has detailed documentation in the knowledge base:

Quick Commands

# Prepare OS for K3s
ansible-playbook -i inventory/production/hosts.yml playbooks/prep_k3s.yml
 
# Install K3s cluster
ansible-playbook -i inventory/production/hosts.yml playbooks/install_k3s.yml
 
# Install AAP (requires vault password)
cd scripts/aap-install && ./install_aap.sh