Go to file
2025-04-30 07:43:30 +00:00
Examm Update Examm/README.md 2025-04-30 07:43:30 +00:00
web Delete web/assiangment 2 2025-04-15 16:44:29 +00:00
z2 Update z2 /README.md 2025-04-15 19:18:49 +00:00
Apache:default.conf.sh Upload files to "/" 2025-03-26 10:20:03 +00:00
Apache.conf.sh Upload files to "/" 2025-03-26 10:20:03 +00:00
app:db_init.sql Upload files to "/" 2025-03-26 10:20:03 +00:00
app:index.php Upload files to "/" 2025-03-26 10:20:03 +00:00
deployment.yaml Upload files to "/" 2025-04-15 16:41:32 +00:00
docker-compose.yaml Update docker-compose.yaml 2025-03-26 10:15:10 +00:00
Dockerfile Upload files to "/" 2025-04-15 16:41:32 +00:00
index.html Upload files to "/" 2025-04-15 16:41:32 +00:00
namespace.yaml Upload files to "/" 2025-04-15 16:41:32 +00:00
prepare-app.sh Upload files to "/" 2025-04-15 16:41:32 +00:00
pv-pvc.yaml Upload files to "/" 2025-04-15 16:41:32 +00:00
README.md Update README.md 2025-04-15 16:43:40 +00:00
remove-app.sh assiangment 1 2025-03-19 12:22:46 +01:00
script.js Upload files to "/" 2025-04-15 16:41:32 +00:00
service.yaml Upload files to "/" 2025-04-15 16:41:32 +00:00
start-app.sh Upload files to "/" 2025-04-15 16:41:32 +00:00
statefulset.yaml Upload files to "/" 2025-04-15 16:41:32 +00:00
stop-app.sh Upload files to "/" 2025-04-15 16:41:32 +00:00
style.css Upload files to "/" 2025-04-15 16:41:32 +00:00
test.php Upload files to "/" 2025-03-26 10:20:03 +00:00

🧠 Typing Speed & RSI Awareness Game - Kubernetes Deployment

This project showcases a web-based Typing Speed & RSI Awareness Game deployed on a Kubernetes cluster. Although the game is a simple frontend app (HTML, CSS, JavaScript), the Kubernetes setup is fully compliant with deployment best practices and assignment requirements.


🎮 Game Overview

The application is designed to:

  • Improve typing speed and accuracy.
  • Educate users on RSI (Repetitive Strain Injury) prevention.
  • Include real-time feedback and typing stats.
  • Encourage healthy typing habits with periodic stretch reminders.

How to Run

Step 1: Prepare the Application

./prepare-app.sh
  • Builds the Docker image: typing-game
  • Saves it as a .tar for loading on cluster nodes
  • Prepares persistent storage

Step 2: Deploy the Application

./start-app.sh

This applies:

  • Namespace
  • Deployment
  • Service
  • StatefulSet
  • PersistentVolume + PersistentVolumeClaim

Step 3: Access the App

Open in your browser:

http://<your-node-ip>:30007

Replace <your-node-ip> with the external IP of your Kubernetes node.


Step 4: Clean Up

./stop-app.sh

This deletes all Kubernetes resources created by this project.


Assignment Requirements

1. Namespace

Requirement: All objects must belong to a custom namespace.
You Did: Defined typing-game in namespace.yaml, and referenced it in all other files.

2. Deployment

Requirement: Deploy your web application.
You Did: Used deployment.yaml to deploy your frontend game using Nginx.

3. StatefulSet + PersistentVolume + PersistentVolumeClaim

Requirement: Demonstrate persistent storage via a StatefulSet.
You Did:

  • Used statefulset.yaml with Alpine Linux writing logs to /data/log.txt.
  • Mounted /data using a PVC created from pv-pvc.yaml.

4. Service

Requirement: Expose your app.
You Did: Used a NodePort service in service.yaml on port 30007.

5. start-app.sh

Requirement: Script to create all objects.
You Did: Automated creation of namespace, Deployment, Service, StatefulSet, PV/PVC.

6. stop-app.sh

Requirement: Script to delete all objects.
You Did: Cleanly removes all created Kubernetes objects.

7. prepare-app.sh

Requirement: Prepares the environment.
You Did: Builds and saves Docker image, prepares persistent volume.

8. Dockerfile

Requirement: Provide necessary container files.
You Did: Dockerfile builds a custom Nginx image that serves your HTML/JS/CSS game files.