Location Research Breakthrough Possible @S-Logix pro@slogix.in

Kubernetes-Based Persistent Storage Architecture for an Enterprise Procurement Management Application

Description

The proposed system deploys an Enterprise Procurement Management Application as a containerized workload on Kubernetes. The application manages procurement activities such as purchase requests, approvals, supplier information, purchase orders, and delivery records. Kubernetes manages the application containers, while Persistent Volumes (PV) and Persistent Volume Claims (PVC) provide reliable persistent storage for the application database and business data. PostgreSQL is used to store procurement information, while persistent storage ensures that data is retained even when application Pods are restarted, recreated, or fail. The architecture therefore provides reliable data persistence, application availability, and recovery for the enterprise procurement system.

Aim

To design and implement a Kubernetes-based procurement application with persistent storage that ensures continuous availability and reliable preservation of procurement data during container restarts, failures, and redeployments.

Objectives

01 Containerize the procurement application using Docker.
02 Deploy and manage the application using Kubernetes.
03 Implement Persistent Volumes and Persistent Volume Claims for reliable data storage.
04 Store procurement data using a PostgreSQL database.
05 Ensure data remains available during Pod restart or failure.
06 Implement backup and recovery for important procurement data.
07 Monitor application and storage performance.

Application Workflow

01

Stage 1 – User Login and Access

Process

The employee or procurement staff logs into the Procurement Management Application to access purchasing functions.

Tools
Keycloak Kubernetes PostgreSQL
Implementation

The user submits login credentials to the application. Keycloak authenticates the user and provides an access token. The application verifies the user's role and permissions before allowing access to procurement functions.

02

Stage 2 – Purchase Request

Process

The employee creates a purchase request for required goods or services.

Tools
Docker Kubernetes PostgreSQL
Implementation

The user enters item details, quantity, and requirement information. The containerized application processes the request and stores the purchase request in PostgreSQL.

03

Stage 3 – Request Approval

Process

The manager reviews and approves or rejects the purchase request.

Tools
Kubernetes PostgreSQL Keycloak
Implementation

The manager accesses the pending request based on their role. After approval or rejection, the application updates the request status and stores the decision in PostgreSQL.

04

Stage 4 – Supplier and Purchase Order

Process

The procurement team selects a supplier and creates a purchase order for the approved request.

Tools
Kubernetes PostgreSQL Helm
Implementation

The procurement team selects the appropriate supplier and enters product, quantity, and price details. The application generates the purchase order and stores it in PostgreSQL.

05

Stage 5 – Persistent Storage

Process

The application permanently stores procurement data so that it is not lost when containers or Pods restart.

Tools
Kubernetes Persistent Volume (PV) Persistent Volume Claim (PVC) PostgreSQL Cloud EBS
Implementation

A PVC requests storage for PostgreSQL, and Kubernetes binds it to a Persistent Volume. The PV uses EBS storage, allowing purchase requests, supplier details, purchase orders, and delivery records to remain available after Pod restart or recreation.

06

Stage 6 – Delivery and Data Update

Process

The procurement team records the delivery and verifies the received items.

Tools
Kubernetes PostgreSQL Persistent Storage
Implementation

After receiving the goods, the team updates the delivery status in the application. The updated information is stored in PostgreSQL on persistent storage and remains available for future reference.

07

Stage 7 – Monitoring and Recovery

Process

The application, Kubernetes Pods, database, and storage are monitored to ensure availability and reliable operation.

Tools
Prometheus Grafana Kubernetes
Implementation

Prometheus collects application and Kubernetes metrics, while Grafana displays them through dashboards. Pod failures are tested to verify Kubernetes recovery and confirm that procurement data remains available through persistent storage.

Cloud Infrastructure and Tools

Cloud Network Cloud VPC

Provides a private and isolated network for the Kubernetes cluster, application, database, and storage components.

Cloud Compute Cloud EC2

Provides virtual servers for the self-hosted Kubernetes control plane and worker nodes.

Operating System Ubuntu Server 24.04 LTS

Provides the operating system environment for the EC2-based Kubernetes servers.

Containerization Tool Docker

Packages the Enterprise Procurement Management Application into portable containers for deployment on Kubernetes.

Container Registry Harbor

Stores the Docker images of the procurement application and makes them available to Kubernetes during deployment.

Container Orchestration Tool Kubernetes

Deploys and manages the procurement application containers, handles Pod recovery, and manages application services and storage resources.

Ingress / Reverse Proxy NGINX Ingress Controller

Receives external HTTP/HTTPS requests and routes them to the Procurement Management Application running inside Kubernetes.

Database Engine PostgreSQL 14

Stores purchase requests, supplier information, purchase orders, approval records, delivery details, and other procurement data.

Storage Request Persistent Volume Claim (PVC)

Allows PostgreSQL to request the storage required for maintaining procurement database data.

Persistent Storage Persistent Volume (PV)

Provides persistent storage to the PostgreSQL workload and keeps data independent of the Pod lifecycle.

Cloud Storage Cloud EBS with EBS CSI Driver

Provides the underlying Cloud block storage for the Kubernetes Persistent Volume and stores PostgreSQL data persistently.

Deployment Tool Helm

Packages and deploys the procurement application, PostgreSQL, Kubernetes resources, and storage configurations.

Infrastructure as Code OpenTofu

Creates and manages the cloud VPC, EC2 servers, security configuration, and supporting infrastructure.

Automation Tool Ansible

Automates Ubuntu configuration, Kubernetes installation, cluster setup, and EBS CSI Driver configuration.

Monitoring Tool Prometheus

Collects metrics from Kubernetes, application Pods, PostgreSQL, CPU, memory, and persistent storage.

Dashboard Tool Grafana

Displays application, Kubernetes, database, and storage metrics through monitoring dashboards.

Implementation Process

01
Step 1 – Analyze the Application and Storage Requirements
  • Analyze the procurement application workflow and database requirements.
  • Identify data such as purchase requests, suppliers, purchase orders, and delivery records.
  • Define CPU, memory, storage capacity, and database requirements.
  • Identify the application and database components requiring persistent storage.
  • Define backup, recovery, and data availability requirements.
02
Step 2 – Create the Cloud Infrastructure
  • Use OpenTofu to create the cloud VPC and required network configuration.
  • Create EC2 instances running Ubuntu Server 24.04 LTS.
  • Configure Security Groups to control required network access.
  • Configure EBS storage for persistent database data.
  • Use Ansible to automate server configuration and Kubernetes prerequisites.
03
Step 3 – Deploy Kubernetes and Containerized Application
  • Install and configure the Kubernetes cluster on the EC2 instances.
  • Install the EBS CSI Driver to integrate Kubernetes with cloud EBS.
  • Build the procurement application as a Docker container image.
  • Push the image to the Harbor Container Registry.
  • Deploy the application on Kubernetes using Helm.
04
Step 4 – Configure Database and Persistent Storage
  • Deploy PostgreSQL as a Kubernetes StatefulSet.
  • Create a Persistent Volume Claim (PVC) for database storage.
  • Configure the PVC to use a Persistent Volume (PV) backed by Cloud EBS.
  • Mount the PVC to PostgreSQL for storing procurement data.
  • Verify that data remains available after Pod restart or recreation.
05
Step 5 – Configure Access, Monitoring and Recovery
  • Configure NGINX Ingress Controller to route external HTTP/HTTPS requests to the application.
  • Configure Prometheus to collect application, Kubernetes, database, and storage metrics.
  • Configure Grafana dashboards for system and storage monitoring.
  • Test Pod failure, restart, and database recovery scenarios.
  • Verify that procurement data remains available after application or Pod failure.

Proposed Solution

The proposed solution provides a Kubernetes-based persistent storage architecture for an Enterprise Procurement Management Application. The application runs as a Docker container on a self-hosted Kubernetes cluster deployed on cloud EC2 servers with Ubuntu Server 24.04 LTS inside a secure cloud VPC. PostgreSQL is used to store procurement data such as purchase requests, supplier details, purchase orders, approval records, and delivery information. Kubernetes manages the application and database workloads, while Persistent Volume (PV) and Persistent Volume Claim (PVC) provide persistent storage through cloud EBS using the EBS CSI Driver. NGINX Ingress Controller manages external HTTP/HTTPS requests and routes them to the procurement application. Prometheus and Grafana provide monitoring of application, database, Kubernetes, and storage performance. This architecture ensures that important procurement data remains available even when application Pods are restarted, recreated, or fail.

Benefits

Data Persistence: Procurement data such as purchase requests, supplier details, and purchase orders remains available on persistent cloud EBS storage even when application Pods restart or are recreated.
Application Recovery: Kubernetes automatically recreates failed application Pods and reconnects them to the required persistent storage.
Reliable Database Storage: PostgreSQL stores procurement information on persistent storage instead of temporary container storage.
Automated Infrastructure: OpenTofu and Ansible reduce manual configuration by automating cloud infrastructure and Kubernetes server setup.
Storage Monitoring: Prometheus and Grafana provide visibility into storage usage, database performance, CPU, memory, and Kubernetes resources.

Challenges

Availability Zone Dependency: Cloud EBS volumes are associated with a specific Availability Zone, so Kubernetes must schedule the workload appropriately when reconnecting to the volume.
Storage Configuration: Incorrect PVC, PV, StorageClass, or EBS CSI Driver configuration can cause storage attachment or mounting problems.
Resource Usage: PostgreSQL, Kubernetes, monitoring, and storage components require additional CPU, memory, and disk resources.
Backup and Recovery: Important procurement data requires proper database backup and recovery procedures to protect against data loss.
Configuration Complexity: Managing Kubernetes, PostgreSQL, persistent storage, networking, and monitoring together requires careful configuration and testing.