July 6, 2026 | Infrastructure as Code
This project establishes a robust, repeatable pipeline for deploying K3s Kubernetes clusters. By leveraging a modular "Separation of Concerns" strategy, we utilize Terraform for infrastructure provisioning and Ansible for software configuration, creating a scalable GitOps-lite workflow.
To ensure maintainability and portability, the architecture is divided into two distinct layers:
null_resource with local-exec to trigger Ansible playbooks automatically, removing manual intervention.k3s_prereqs, k3s_cluster_join) for easier debugging and scaling.kubectl before marking the deployment as complete.This "Infrastructure as Code" approach provides high portability across different hypervisors. By treating Ansible roles as OS-level configurations rather than hypervisor-specific scripts, the pipeline can be adapted from on-prem KVM/VMware labs to cloud environments with minimal changes.