🛠️ Ansible Kubernetes HA Cluster – Infrastructure Automation Project
🌐 Project Overview
This project is a fully automated Infrastructure as Code (IaC) solution using Ansible to provision a Highly Available (HA) Kubernetes Cluster. It demonstrates end-to-end automation of a production-ready Kubernetes environment with multi-master architecture and HAProxy-based load balancing.
⚙️ Technologies Used
Ansible – for automated provisioning and orchestration
Kubernetes (HA) – with 3 control plane nodes and worker nodes
HAProxy – external load balancer for high availability of API server
Containerd – container runtime for lightweight and secure workloads
Ubuntu 22.04 / 24.04 – as the OS base on all nodes
(Optional) Keepalived + Floating IP – for local failover/load balancer setup
📌 Key Features
🔧 Modular Ansible roles (common, containerd, kubernetes, lb-haproxy, master/worker)
🔄 One-command cluster setup and teardown (
playbook.yml
andreset-k8s.yml
)🧩 Clear inventory structure with IP mapping and SSH configuration
💡 Designed for easy extensibility and reusability
📂 Comprehensive documentation with directory tree and usage steps
🛡️ Secure, consistent deployment following DevOps best practices
🎯 Goals & Purpose
Showcase real-world skills in DevOps, IaC, and Kubernetes automation
Create a reusable template for production or lab Kubernetes HA clusters
Demonstrate infrastructure design thinking and tool integration
📁 Project Output
A working multi-node Kubernetes HA cluster with load balancing
Full Ansible playbook repo including:
playbook.yml
– main setup automationreset-k8s.yml
– cluster reset automationroles/
– organized task files per componentinventory/
– group-based host inventory
Professional
README.md
with badges, usage guide, and structure
📌 GitHub Repository:
👉 https://github.com/masdikaaa/ansible-k8s-ha-cluster