Skip to content

haideralimazari/bankapp-eks-gitops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏦 BankApp EKS β€” GitOps on AWS

Production-grade Banking Application with AI Integration, deployed on Amazon EKS using a complete GitOps pipeline.

AWS EKS Terraform ArgoCD Spring Boot Prometheus Grafana


A fully automated, zero-touch deployment pipeline featuring a Java Spring Boot banking app with a self-hosted TinyLlama AI chatbot, secured with TLS, monitored with Prometheus & Grafana, and managed through GitOps.


πŸ“‹ Table of Contents


πŸš€ Overview

This project demonstrates an end-to-end DevOps lifecycle for banking application. Every component β€” from cloud infrastructure to application deployment β€” is automated, version-controlled, and observable.

Feature Implementation
πŸ–₯️ Core App Java 21 + Spring Boot 3.4.1 with Glassmorphism UI
πŸ€– AI Integration Self-hosted TinyLlama via Ollama running on EKS
πŸ”„ GitOps Fully automated deployments with ArgoCD auto-sync
πŸ”’ Security Automated TLS via Cert-Manager + Let's Encrypt
πŸ“ˆ Scalability Custom HPA logic for traffic spike handling
πŸ“Š Observability Full Prometheus + Grafana + Node Exporter stack
πŸ—οΈ IaC 84 AWS resources provisioned via Terraform

πŸ—οΈ Architecture & Infrastructure

Cloud Infrastructure β€” AWS EKS

Managed EKS cluster running Kubernetes 1.35 across 3 Availability Zones, provisioned entirely through Terraform.

AWS EKS Cluster Active bankapp-eks cluster on Kubernetes v1.35 β€” Standard support until March 2027


βš™οΈ Infrastructure as Code (Terraform)

The entire AWS infrastructure is defined as code β€” VPC, subnets, EKS cluster, node groups, KMS encryption keys, IAM roles, and security groups. A single terraform apply provisions everything from scratch.

module "eks" {
  source          = "terraform-aws-modules/eks/aws"
  cluster_name    = "bankapp-eks"
  cluster_version = "1.35"

  # KMS encryption for secrets at rest
  cluster_encryption_config = {
    provider_key_arn = module.kms.key_arn
    resources        = ["secrets"]
  }

  # Tags managed by Terraform
  tags = {
    Environment = "production"
    ManagedBy   = "terraform"
    Project     = "BankApp-EKS"
  }
}

Terraform Plan terraform plan output β€” 84 resources to add, including VPC, EKS cluster, managed node groups, and KMS encryption keys

Key Terraform resources provisioned:

  • aws_eks_cluster β€” Managed control plane with private API endpoint
  • aws_kms_key β€” Envelope encryption for Kubernetes secrets (ENCRYPT_DECRYPT)
  • aws_vpc + subnets β€” Isolated network across 3 AZs
  • aws_eks_node_group β€” Managed node group bankapp-ng with auto-scaling

πŸ”„ GitOps & Deployment (ArgoCD)

This project follows a Zero-Touch Deployment strategy. Any commit pushed to the main branch is automatically detected and reconciled by ArgoCD β€” no manual kubectl apply ever needed.

Developer β†’ git push β†’ GitHub β†’ ArgoCD detects diff β†’ Auto-sync to EKS

ArgoCD Deployment Tree ArgoCD showing all 18 resources Synced and Healthy β€” bankapp, mysql, ollama deployments all running

ArgoCD Sync Status:

  • βœ… App Health: Healthy
  • βœ… Sync Status: Synced to main (358e8d6)
  • βœ… Last Sync: Succeeded β€” "feat: improve UI for better dashboard visibility"
  • πŸ” Auto sync: Enabled

🌐 Networking & Ingress (Gateway API)

Instead of the traditional Nginx Ingress, this project uses the modern Kubernetes Gateway API with Envoy Gateway β€” the future standard for Kubernetes traffic management.

Internet β†’ AWS NLB β†’ Envoy Gateway β†’ HTTPRoute β†’ bankapp Service β†’ Pods

Gateway API Traffic Routing kubectl get gatewayclass,gateway,httproute -A β€” GatewayClass accepted, Gateway programmed, HTTPRoutes active

Networking highlights:

  • Load Balancer: AWS Network Load Balancer (NLB) β€” ae60421e9a46c4647986bd338593c86c-90267515.us-east-1.elb.amazonaws.com
  • Gateway Controller: gateway.envoyproxy.io/gatewayclass-controller
  • Dynamic DNS: nip.io for instant public access without custom domain setup
  • TLS/SSL: Automated certificate issuance and renewal via Cert-Manager + Let's Encrypt

πŸ’» Live Application

The BankApp is a modern banking dashboard built with Spring Boot, featuring real-time balance display, deposits, withdrawals, and peer-to-peer transfers β€” all backed by MySQL on Kubernetes.

Live BankApp Live BankApp running at https://18.233.48.133.nip.io/dashboard β€” Glassmorphism UI with Deposit, Withdraw & Transfer

App features:

  • πŸ’° Real-time account balance display
  • βž• Deposit funds
  • βž– Withdraw funds
  • πŸ” Transfer to other users
  • πŸ€– AI chatbot powered by self-hosted TinyLlama (Ollama)

πŸ“Š Monitoring & Observability

Full observability stack deployed inside the cluster β€” Prometheus scrapes metrics, Grafana visualizes them, and Node Exporter exposes host-level metrics.

Cluster-Wide Resource Monitoring

Kubernetes Cluster Monitoring Grafana β€” Kubernetes Compute Resources / Cluster: CPU utilisation 3.92%, Memory 46.6%, across argocd, bankapp, envoy-gateway namespaces

Application Workload Monitoring

Grafana Workload Dashboard Grafana β€” Namespace (bankapp): Per-workload CPU/Memory quotas for bankapp, mysql, ollama, and bankapp-tls challenge pods

Workload Pods CPU Usage CPU Requests Memory
bankapp 2 0.0138 0.500 506 MiB
ollama 1 0.00192 0.500 β€”
mysql 1 0.00476 0.250 β€”

Node-Level Metrics (Node Exporter)

Node Exporter Dashboard Node Exporter dashboard β€” CPU Usage near 0% idle, Memory at 52.4% used, Load Average stable across 1m/5m/15m


πŸ› οΈ Tech Stack

Layer Tools
☁️ Cloud AWS (EKS, VPC, EBS, ELB, KMS, IAM)
πŸ—οΈ Automation Terraform, GitHub Actions, ArgoCD
🌐 Networking Gateway API, Envoy Proxy, Cert-Manager, Let's Encrypt
πŸ“¦ App Stack Java 21, Spring Boot 3.4.1, MySQL 8
πŸ€– AI/LLM Ollama, TinyLlama
πŸ“Š Monitoring Prometheus, Grafana, Node Exporter, kube-state-metrics
🐳 Container Docker, Kubernetes 1.35

⚑ Quick Start

Prerequisites

  • AWS CLI configured with appropriate permissions
  • Terraform β‰₯ 1.5
  • kubectl
  • ArgoCD CLI (optional)

1. Clone the Repository

git clone https://github.com/your-username/bankapp-eks-gitops
cd bankapp-eks-gitops

2. Provision AWS Infrastructure

cd terraform
terraform init
terraform plan    # Review: 84 resources to add
terraform apply   # ~20 minutes

3. Connect to the EKS Cluster

aws eks update-kubeconfig \
  --region us-east-1 \
  --name bankapp-eks

4. Deploy via ArgoCD

kubectl apply -f argocd/application.yml
# ArgoCD will auto-sync and deploy all workloads

5. Verify Deployment

# Check all resources
kubectl get gatewayclass,gateway,httproute -A

# Check pods
kubectl get pods -n bankapp

# Access Grafana
kubectl port-forward svc/grafana 3000:3000 -n monitoring

πŸ“ Project Structure

bankapp-eks-gitops/
β”œβ”€β”€ terraform/          # AWS infrastructure (EKS, VPC, KMS, IAM)
β”œβ”€β”€ k8s/
β”‚   β”œβ”€β”€ bankapp/        # Spring Boot app manifests
β”‚   β”œβ”€β”€ mysql/          # StatefulSet + PVC
β”‚   β”œβ”€β”€ ollama/         # TinyLlama deployment
β”‚   β”œβ”€β”€ gateway/        # Gateway API, HTTPRoutes
β”‚   β”œβ”€β”€ cert-manager/   # ClusterIssuer, Certificates
β”‚   └── monitoring/     # Prometheus, Grafana, Node Exporter
β”œβ”€β”€ argocd/
β”‚   └── application.yml # ArgoCD Application manifest
└── app/                # Spring Boot source code

Java 21 Β· Spring Boot Β· AWS EKS Β· Terraform Β· ArgoCD Β· Prometheus Β· Grafana

About

GitOps-based CI/CD pipeline for a banking application deployed on AWS EKS using ArgoCD for continuous deployment, with automated Docker builds and Kubernetes manifests managed via GitHub Actions.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors