Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mateuseap/kubernetes-calculator
Kubernetes Calculator application.
https://github.com/mateuseap/kubernetes-calculator
flask k8s react
Last synced: 3 days ago
JSON representation
Kubernetes Calculator application.
- Host: GitHub
- URL: https://github.com/mateuseap/kubernetes-calculator
- Owner: mateuseap
- Created: 2023-12-11T21:13:56.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-13T09:30:30.000Z (about 1 year ago)
- Last Synced: 2023-12-14T04:39:05.614Z (about 1 year ago)
- Topics: flask, k8s, react
- Language: TypeScript
- Homepage: https://www.mateuseap.com/kubernetes-calculator/
- Size: 376 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kubernetes Calculator
Welcome to the **Kubernetes Calculator** application!
This tool helps you calculate Kubernetes resources efficiently. Below are the prerequisites, setup, and run instructions for both the frontend and backend components.
## Prerequisites
Before getting started, ensure you have the following installed on your machine:- [Node.js](https://nodejs.org/) and [npm](https://www.npmjs.com/) for the frontend.
- [Python](https://www.python.org/) and [virtualenv](https://pypi.org/project/virtualenv/) for the backend.## Frontend
### Setup and Run
Start by creating a ``.env`` file in the frontend folder. Use the example in [``.env.template``](./frontend/.env.template) file as a guide and add your own settings. Once that's done, install the dependencies and launch the React app:
```bash
# Install the dependecies
npm install# Run the React app
npm run dev
```You can then access the application locally at http://localhost:5173/kubernetes-calculator/. It automatically refreshes whenever you make changes.
### Deploy
If you wish to deploy from your local source, start by building the project and then run the ``deploy`` script:
```bash
# Build the project
npm run build# Deploy
npm run deploy
```Alternatively, deployment is a breeze. Just push changes to the `main` branch, and the [frontend deploy workflow](./.github/workflows/frontend-deploy.yml) will automatically run.
## Backend
### Setup and Run
To start off, you'll need to create a virtual environment and install the necessary dependencies:
```bash
# Create and activate the virtual environment
python -m venv venv
source venv/bin/activate# Install the required dependencies
pip install -r requirements.txt
```Next, run the Flask server locally:
```bash
# Run the Flask server
flask run --debug --port 5000
```The backend will be accessible locally at http://localhost:5000. The ``--debug`` flag enables automatic reloading whenever changes are made to the backend code.
### Deploy
The deploy will be automatically done when you update the `main` branch.