This project is a Python-based server that helps identify the AWS EC2 instances or Azure VMs that best fit for a Kubernetes cluster based on their CPU and memory requirements and limits.
- Python 3.9 or higher
- Docker (optional, for containerization)
- Clone the repository:
git clone git@github.com:raghavendra-rafay/k8s-cost-clinder.git
cd k8s-cost-clinder
- (Optional) Create and activate a virtual environment:
python3 -m venv venv
source venv/bin/activate
- Install the required Python dependencies:
pip install -r requirements.txt
- Start the server:
python app.py
- Access the server:
Open your web browser and go to http://localhost:5000.
- If you see an HTML form, you can upload a kubeconfig file and click the "Identify Instance" button to get the instance information that best fits the Kubernetes cluster.
- If you see an error message or encounter any issues, please make sure the server is running correctly and check the terminal for any error logs.
- Build the Docker image:
docker build -t flask-server .
- Run the Docker container:
docker run -p 9000:5000 --name flask-server-container flask-server
- Access the server:
Open your web browser and go to http://localhost:9000.