Thesis Project: Kuro Custom
Design, implementation, and validation of a highly available, elastically scalable Linux cloud infrastructure (Ubuntu Server 24.04 LTS on AWS us-east-1) using self-managed Kubernetes (kubeadm), Calico CNI network segmentation, observability, and Chaos Engineering, validated with independent stress tests of 30,000 concurrent HTTP requests (300 threads in Apache JMeter).
Cloud infrastructure provisioned through declarative tooling (Terraform, Ansible, Kubernetes manifests), with no plaintext credentials in the repository and the full lifecycle automated through GitHub Actions.
Configuration Drift & Flat Network Vulnerabilities
Traditional e-commerce cloud deployments often suffer from "configuration drift", costly downtime during deployments, uncontrolled cloud spending, and vulnerabilities caused by flat internal networks. Moreover, many organizations adopt managed cloud services without evaluating alternatives, or run Kubernetes clusters without granular control over internal traffic. The research question was how an automated cloud architecture (IaC and container orchestration on Linux) mitigates configuration drift, shortens deployment times, and ensures high availability compared with manual provisioning. The central objective was to design and implement an integral, scalable, fault-tolerant cloud architecture based on Linux and cloud-native technologies, and to validate it empirically on Kuro Custom, an e-commerce platform (Django backend, Astro/React frontend, and PostgreSQL 16.3). The experimental phase was limited exclusively to AWS (no GCP, Azure, EKS, or VM autoscaling) with Ubuntu Server 24.04 LTS (selected after comparing enterprise Linux distributions), self-managed Kubernetes (kubeadm), Calico CNI, observability, and declarative automation (Terraform + Ansible + GitOps), sustaining peaks of up to 800% CPU over the base quota with continuous availability, under FinOps and Green Cloud Computing principles.
Frontend → Backend API
ALLOWEDAllowed via NodePort 30800 & internal K8s Service abstraction.
Worker Nodes → Private RDS :5432
INTERNALInternal VPC routing without NAT Gateway fee; egress blocked.
Implicit Denied Traversal
DENIEDFrontend cannot reach RDS directly (5432); the monitoring namespace is isolated.
Stress Testing & Chaos Protocols
Results measured with Apache JMeter in two independent runs (300 threads with a 60 s ramp-up and 100 iterations each: 30,000 HTTP requests per run): one against the frontend and one against the backend API, with HPA peaks of up to 794% and 800% CPU.
Calico v3.28 · default-deny-ingress · Pod CIDR: 192.168.0.0/16
Declarative Infrastructure & Network Segmentation
Architecture deployed on AWS us-east-1 following the Twelve-Factor App methodology and AWS Well-Architected Framework pillars:
Infrastructure as Code & Network (IaC)
Declarative VPC (10.0.0.0/16) with public and private subnets in us-east-1a and us-east-1b. Multi-AZ Application Load Balancer with path-based routing (/api/* to Django, / to Astro/React) and TLS via ACM, with DNS managed in Cloudflare.
Linux Node Hardening & Containerd Runtime
Ansible provisioning in 4 layers: OS hardening (SSH, sysctl, swap off), container tooling (containerd, kubeadm), cluster init with Calico and Metrics Server, and observability. One control plane (c7i-flex.large) and 2 workers (m7i-flex.large) across both AZs.
Isolated Data Tier without NAT Costs
PostgreSQL in private subnets with no route to the Internet Gateway and no NAT Gateway cost. Internal VPC routing and a dedicated Security Group allow port 5432 only from the workers; no public access, encryption at rest (KMS), and egress blocked.
Network Segmentation Policies (Calico CNI)
Default-deny-ingress model with explicit per-service allowlists and specific egress rules for backend and frontend, preventing unauthorized pod-to-pod traffic and lateral movement. The monitoring namespace has its own default-deny-ingress policy plus explicit allow rules.
Immutable Observability & Telemetry Stack
Auto-provisioned via ConfigMaps and Secrets without plaintext passwords in git, with Prometheus scraping Node Exporter and cAdvisor to track node and pod saturation during load tests.
Containers & GitOps CI/CD
Backend (Django) and frontend (Astro/React) images published to Docker Hub. Separate infrastructure (Terraform + Ansible) and application pipelines, ephemeral SSH access closed with if: always(), and a security workflow (Tfsec in warning mode and Trivy, which fails on CRITICAL CVEs).
Global Thesis Cloud Architecture (AWS Multi-AZ & K8s)
End-to-end view in four phases: (I) AWS base infrastructure with the ALB, Security Groups, and RDS PostgreSQL 16.3; (II) Linux nodes (1 control plane and 2 workers); (III) Kubernetes orchestration with frontend (Astro SSR on Node) and backend (Django + Gunicorn) pods, HPA, Calico Network Policies, Metrics Server, and Node Exporter; (IV) GitOps flow with GitHub Actions. It also shows the JMeter stress test hitting the ALB.

User Request Flow & ALB Routing
The user resolves kurocustom.uk via Cloudflare DNS and reaches the ALB (443, ACM certificate). By default (/) traffic goes to the frontend (NodePort 30080); /api/*, /admin/*, and /static/* go to the Django backend (NodePort 30800); and the grafana.kurocustom.uk host goes to Grafana (NodePort 30300). Only the backend connects to RDS on port 5432.

Empirical Findings & Production Readiness
The experimental validation showed 0.00% errors on the frontend and a 99.98% success rate on the backend API (0.02% error rate) under extreme load, on a fixed-node infrastructure.
- >Frontend under stress: 30,000 requests at 374.87 req/s, 301.79 ms average response time, and 0.00% errors. Backend API: 195.00 req/s and 99.98% success (0.02% error rate).
- >Elastic scaling validated: HPA went from 2 to 5 replicas with CPU peaks of 794% (frontend) and 800% (backend), and returned to 2 replicas after cooldown.
- >Multi-AZ high availability: on abrupt Worker Node failure, the ALB converged in under 60 s and the service never suffered a total outage.
- >MTTR cut from hours to minutes: automated rebuild of a destroyed node in 3 min 44 s through GitHub Actions, Terraform, and Ansible.
- >Decoupled persistence: Amazon RDS absorbed 25 simultaneous connections with a CPU peak of only 18.1%. Internal segmentation with Calico CNI.
- >Immutability audit: terraform plan detected and reverted manual Configuration Drift on a Security Group. Aligned with Twelve-Factor App, FinOps, and Green Cloud Computing.
Rigorous Engineering Trade-offs
Each technical choice was intentionally balanced against cost, observability, and experimental reproducibility.
Self-managed Kubernetes (kubeadm) vs. Amazon EKS
kubeadm on EC2 was chosen to avoid the EKS control plane fee of $0.10/hour (~$73/month), which falls outside the AWS Free Tier, and to observe etcd, kube-apiserver, and the scheduler directly in Prometheus without a managed-service abstraction. The trade-off: no native Cluster Autoscaler, so HPA scales pods but nodes stay fixed.
Fixed EC2 sizing as a methodological experimental decision
The 3 nodes (1 c7i-flex.large control plane and 2 m7i-flex.large workers, in different Availability Zones) were provisioned with fixed capacity by experimental design, so Chaos Engineering tests would be reproducible and comparable across runs. This is a deliberate choice, unlike the static sizing anti-pattern; in production, Auto Scaling Groups or EKS with Karpenter would be used.
Calico CNI with strict Network Policies vs. basic overlays
Unlike Flannel (VXLAN connectivity without segmentation), Calico programs iptables rules enforcing a default-deny-ingress model: the frontend cannot reach RDS directly, the backend does not initiate connections to the frontend, and the monitoring namespace is isolated. Specific egress rules for backend and frontend complement the policy.
RDS in private subnets without NAT Gateway operational cost
RDS only accepts inbound connections from the workers and never initiates outbound internet connections. Since both share the same VPC, workers reach PostgreSQL through internal routing, with no need for a NAT Gateway and its associated cost. During the stress test, the database absorbed 25 simultaneous connections with a CPU peak of just 18.1%.
Horizontal Pod Autoscaler (HPA) with 50% CPU Target Tracking
In-cluster autoscaling: the backend and frontend Deployments scale from 2 to 5 replicas when average CPU usage exceeds 50%. With 30,000 requests per test (300 threads), the frontend recorded 0.00% errors and the backend 0.02% (5 HTTP 502 responses before the new replicas passed their readiness probes); after a ~10-minute cooldown both returned to 2 replicas.
Dynamic CI/CD with ephemeral Security Group ingress windows
The GitHub Actions pipeline opens SSH (port 22) in the Security Groups only for the runner IP while the job runs, and closes it with if: always() even if the pipeline fails. A separate security workflow runs Tfsec on Terraform (soft_fail) and Trivy on images, and fails on CRITICAL vulnerabilities. The same pipeline rebuilt a terminated node in 3 min 44 s.
In-cluster frontend hosting vs. decoupled S3 + CloudFront
S3 + CloudFront was evaluated and discarded to keep UI traffic inside the cluster under study. Serving the frontend from Kubernetes made it possible to measure the full load (frontend and backend) on the HPA and Prometheus metrics, free of external variables such as CDN caching.
Automated DNS & TLS lifecycle management (Terraform + Cloudflare)
Cloudflare provider integrated in Terraform to handle DNS changes when infrastructure is recreated: it creates the ACM validation records and updates the CNAMEs for the main domain (www and @) and Grafana to point to the new ALB.
Self-managed Kubernetes (kubeadm) vs. Amazon EKS
kubeadm on EC2 was chosen to avoid the EKS control plane fee of $0.10/hour (~$73/month), which falls outside the AWS Free Tier, and to observe etcd, kube-apiserver, and the scheduler directly in Prometheus without a managed-service abstraction. The trade-off: no native Cluster Autoscaler, so HPA scales pods but nodes stay fixed.
Fixed EC2 sizing as a methodological experimental decision
The 3 nodes (1 c7i-flex.large control plane and 2 m7i-flex.large workers, in different Availability Zones) were provisioned with fixed capacity by experimental design, so Chaos Engineering tests would be reproducible and comparable across runs. This is a deliberate choice, unlike the static sizing anti-pattern; in production, Auto Scaling Groups or EKS with Karpenter would be used.
Conclusions
The research empirically demonstrated the technical, economic, and operational feasibility of replacing manual server administration with a Cloud-Native architecture governed by IaC, container orchestration, and CI/CD. On the Kuro Custom case the hypothesis is validated: declarative infrastructure coding combined with Kubernetes cuts deployment and recovery times, eliminates outages caused by human configuration errors, and optimizes compute consumption.
01Base operating system: Ubuntu Server 24.04 LTS
With Linux kernel 6.8.0-1008-aws and the containerd runtime, and no graphical interface, the node kept a light footprint: 14.8% RAM out of 8 GiB during peak-load tests, leaving nearly all hardware to the microservices.
02Idempotency and end of Configuration Drift (Terraform)
Terraform modules provisioned the VPC, ALB, EC2 instances, and Amazon RDS (PostgreSQL). In the audit on the sg_kuro_custom Security Group, terraform plan detected the manual change and reverted it in place (1 to change, 0 to destroy).
03Automation, hardening, and DevSecOps (Ansible and GitHub Actions)
With dynamic AWS inventory, SSH opened only while the runner executes, and unattended containerd setup, a destroyed node was rebuilt and joined from scratch in 3 min 44 s.
04Multi-AZ high availability, self-healing, and elasticity (Kubernetes and Calico)
Kubernetes v1.29.15 cluster (kubeadm). Deleted pods recovered in 7 to 42 s with no outage; when a worker was stopped, the ALB isolated it in under 60 s and Kubernetes rescheduled the replicas (continuous HTTP 200); with CPU peaks of 794% (frontend) and 800% (backend), the HPA scaled both services from 2 to 5 replicas spread across the nodes.
05Observability, stress performance, FinOps, and Green Cloud
With 30,000 concurrent requests (300 JMeter threads): frontend at 374.87 req/s, 301.79 ms average, and 0.00% errors; API at 195.00 req/s and 99.98% success (5 HTTP 502 errors, 0.02%); RDS peaking at 18.1% CPU and 25 connections. Scaling down to 2 replicas brought CPU to 1%-2%, avoiding static overprovisioning (FinOps) and idle resources (Green Cloud).
Next Steps for Kuro Custom
Lines of development derived from the budget and scope limits of the research (section 1.7.2) and the evolution of the Cloud-Native ecosystem.
Managed control plane (Amazon EKS)
Move from kubeadm on EC2 to EKS, delegating high availability, scaling, and patching of the API Server and etcd to the provider.
Node autoscaling (Karpenter / Cluster Autoscaler)
Today HPA scales pods over a fixed EC2 fleet; the proposal is to provision and destroy nodes autonomously when pods exhaust physical capacity.
Service mesh (Istio or Linkerd)
Zero-Trust with transparent mTLS for east-west traffic, plus Canary Releases and A/B testing without changing application code.
Distributed tracing (OpenTelemetry)
Instrument the microservices with OpenTelemetry and Jaeger or Grafana Tempo to trace each transaction from the ALB, through Django, down to the SQL query in RDS.
Active-Active Multi-Region topology
Extend Terraform across several AWS regions with latency-based routing in Amazon Route 53 and cross-region read replicas in RDS.