The code can be found at https://github.com/joh-dah/ScoreBoard
- Start the minikube tunnel with
minikube start
andminikube tunnel
- Start the application with
kubectl apply -f kustomize.yaml
- Access application via
http://10.107.57.82/
- Run
kubectl delete --cascade=foreground -f kustomize.yaml
I built a simple scoreboard to track the scores of e.g. volleyball or table tennis matches. On the starting page, you see a list of all previous games. A new game can be created with the "New Game" button.
You get redirected to a page where you can track the score of the game and afterwards return to the start page.
The Application consists of three microservices. The frontend, the backend and the database.
- Responsibility: Provides a user interface for users to interact with the scoreboard.
- Technology: Vue.js
- API: Exposes REST endpoints to communicate with the backend.
- Responsibility: Manages game entries, updates the database, and serves requested information to the frontend.
- Technology: Flask (Python)
- API: Exposes REST endpoints to communicate with the frontend. Utilizes environment variables for database connection.
- Responsibility: Stores game data persistently.
- Technology: MongoDB
- Storage: Utilizes persistent storage for data that survives infrastructure restarts.
- Microservices: Each component (Frontend, Backend, Database) is a separate microservice, enabling independent scalability.
- RESTful API: Communication between microservices follows REST principles.
- ConfigMap: Configurations are managed using Kubernetes ConfigMap for decoupling.
- Scalability: Microservices allow independent horizontal scaling of components.
- Decoupling: Components are loosely coupled, facilitating independent development and maintenance.
- Resilience: Persistence of MongoDB ensures data survival across infrastructure restarts.
- Complexity: Managing multiple microservices introduces complexity in deployment and monitoring. Espacially for a simple application like this one the three microservices are a lot of unnecessary overhead.
Ensuring secure communication between microservices is crucial. The complex architecture introduces avoidable security risks.
- Secure Communication: Use HTTPS and secure ports for communication between microservices.
- Access Controls: Implement proper access controls for database interactions.
- Automation: Implement CI/CD pipelines for automated deployment and updates.
- Monitoring: Employ Kubernetes monitoring tools for tracking and analyzing microservice behavior.
- Regular Audits: Conduct regular security audits to identify and address vulnerabilities.