Welcome! This repository is a comprehensive, step-by-step, and hands-on guide designed to help you provision, prepare, deploy, maintain, and troubleshoot production-grade, bare-metal or virtualized Cloud-Native infrastructure.
This guide walks you through building a highly available, robust infrastructure utilizing industry-standard open-source tools, starting all the way from Virtual Machine provisioning up to Kubernetes & Storage clusters.
This guide walks you through building a resilient infrastructure from scratch, covering:
- VM & Hypervisor Provisioning: Automating VM creation on VMware vSphere using Terraform and Packer templates.
- Operating System (OS): Linux kernel tuning, sysctl optimizations, and system limits.
- Load Balancer (LB): High-availability Layer 4 & 7 load balancing (HAProxy & Keepalived).
- Kubernetes Cluster (K8s): Multi-master control plane provisioning using Kubeadm.
- Distributed Storage (Ceph): Production-ready Ceph cluster integration with K8s via CSI.
The documentation is modularized into 6 main phases. Click on each section to deep-dive:
- Goal: Create optimized VM templates (Ubuntu/Rocky Linux) using Packer and provision the virtual machines on vSphere using Terraform.
- Verification: Automated VM deployment verification and IP/MAC allocation checks.
- Goal: Understand the underlying theory of VIPs, CRUSH maps (Ceph), VM virtualization templates, and K8s networking (CNI).
- Verification: Architectural diagrams and mental model check-ins.
- Goal: Configure host operating systems, disable swap, set up sysctl/limits, and configure firewalls on provisioned VMs.
- Verification: Run automated validation scripts to ensure environment compliance before installing anything.
- Goal: Step-by-step deployment of HAProxy/Keepalived, a multi-node Ceph cluster, and a multi-master K8s cluster.
- Verification: Execute health verification commands (e.g.,
ceph health detail,kubectl get nodes).
- Goal: Upgrading K8s control plane/nodes, scaling Ceph OSDs, rotating TLS certificates, and managing backups.
- Verification: Performing zero-downtime rolling updates while monitoring active workloads.
- Goal: Diagnose and fix common networking loops, CrashLoopBackOff states, Ceph placement group (PG) errors, and disk failures.
- Verification: Practical fault-injection scenarios and step-by-step recovery playbooks.
- Provision the Virtual Machines: Start with
docs/00-vm-provisioning/to launch your infrastructure on vSphere. - Read the Concepts: Read
docs/01-concepts/to grasp the architecture of K8s, Ceph, and Networking. - Set up the Nodes: Follow
docs/02-preparation/to configure your target operating systems. - Use the Examples: Head over to the
examples/directory for ready-to-use Terraform configs, Packer templates, Ansible playbooks, and K8s manifests. - Verify Each Step: Never skip the Verification section at the end of each document.
✍️ Contributing: Contributions, bug reports, and suggestions are welcome! Feel free to open an Issue or submit a Pull Request.