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.
Before getting started, ensure you have the following installed on your machine:
- Node.js and npm for the frontend.
- Python and virtualenv for the backend.
Start by creating a .env
file in the frontend folder. Use the example in .env.template
file as a guide and add your own settings. Once that's done, install the dependencies and launch the React app:
# 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.
If you wish to deploy from your local source, start by building the project and then run the deploy
script:
# 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 will automatically run.
To start off, you'll need to create a virtual environment and install the necessary dependencies:
# 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:
# 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.
The deploy will be automatically done when you update the main
branch.