Skip to content

A Kubernetes project which calculates CGPA. Caching Mechanism using Redis

Notifications You must be signed in to change notification settings

udeshyaG/k8s-cgpa-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes CGPA Calculator Build Status

Click here to view architecture diagrams

Technology Used 🌟

  • Kubernetes (Container Orchestration)
  • Docker 🐳 (Containerization)
  • Travis CI 👷‍♂️ (Testing and Continuous Integration)
  • React ⚛ (frontend)
  • Node JS, Express (backend)
  • Postgres (database) 🐘
  • Redis (caching)

Kubernetes Cluster Diagram

Explanation

Deployment Description
Client
  • This is the front end of the app
  • The client container has Nginx installed with the built react code
  • Nginx serves the built react app from build folder
Server
  • Handles request to /api
  • Backend of the application. Handles connection to Postgres and Redis
  • Handles calculation logic
Postgres
  • Handles all the data of the application
  • Uses a Persistent Volume Claim to persist data even if pod crashes
Redis
  • In Memory data store used as a cache
  • Stores data as simple key value pairs

Caching Mechanism

- Server gets data from the Redis server - If list is empty then server gets data from Postgres - This data is added to Redis

Screenshots

  1. Homepage - Enter name and semester. This gives you the list of subjects. Enter marks

  1. List of names and CGPA. Caching Mechanism Applied here

  1. Travis CI dashboard


Install and run locally

Setup the Ingress Nginx Controller

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.48.1/deploy/static/provider/cloud/deploy.yaml

Check the installation

kubectl get pods -n ingress-nginx

Create all the Kubernetes Objects

kubectl apply -f k8s/

If there is an error try deleting the server pod. An error may occur if the server pod is started before Redis and Postgres

kubectl delete pod <pod_name>

Check out the app on localhost:80

About

A Kubernetes project which calculates CGPA. Caching Mechanism using Redis

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published