https://github.com/diptochakrabarty/flaskkube-api
A API deployed in Kubernetes and Docker which has been built using Flask and SQL . Authentication and all CRUD methods are possible
https://github.com/diptochakrabarty/flaskkube-api
api api-rest docker docker-compose docker-container docker-image dockerfiles flask flask-api flask-application flask-backend flask-sqlalchemy hacktoberfest kubernetes kubernetes-deployment kubernetes-secrets kubernetes-service rest-api restapi restful-api
Last synced: 3 months ago
JSON representation
A API deployed in Kubernetes and Docker which has been built using Flask and SQL . Authentication and all CRUD methods are possible
- Host: GitHub
- URL: https://github.com/diptochakrabarty/flaskkube-api
- Owner: DiptoChakrabarty
- License: mit
- Created: 2020-04-29T03:20:59.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-01T08:42:41.000Z (about 5 years ago)
- Last Synced: 2025-07-31T16:43:39.263Z (5 months ago)
- Topics: api, api-rest, docker, docker-compose, docker-container, docker-image, dockerfiles, flask, flask-api, flask-application, flask-backend, flask-sqlalchemy, hacktoberfest, kubernetes, kubernetes-deployment, kubernetes-secrets, kubernetes-service, rest-api, restapi, restful-api
- Language: Python
- Homepage: https://flask-kube.herokuapp.com/products
- Size: 26.2 MB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flask Kube api :triangular_flag_on_post:
This Project demonstrates how to deploy an API in docker and Kubernetes,
The api has been built using Flask and supported by a mysql database
## How to run the project :information_source:
For all the steps
```sh
- git clone https://github.com/DiptoChakrabarty/api.git
- cd apiapp
```
### Using Python only :o:
```sh
- Initialize DataBase
In your terminal
> python3
> from apiapp import db
> db.create_all()
> exit
- Run Application API
python3 app.py
```
### Using Docker :whale:
Dockerfile for flask backend is in current directory
Dockerfile for DataBase is in folder db
```sh
- To run in background
docker-compose up -d
- Run Normally
docker-compose up
```
### Using Kubernetes :boom:
I have run and tested the application in minikube and online kubernetes IDE
```sh
- kubectl apply -f kube
- Check service Ip of app
kubectl get svc
- Send requests in the ip provided in the service ip
```

## Send your Requests :bomb:
You can send request using Postman or using your terminal
## For Routes Documentation visit:
[Postman FlaskKube-API Docs](https://documenter.getpostman.com/view/11026000/TVRdBCDc)
## Routes :anger:
| Route | Method | Function |
| --- | --- | --- |
| /productadd | POST | Add data |
| /products | GET | Show data |
| /product/id | GET | Show individual items data |
| /product/id | PUT | Update items data |
| /product/id | DELETE| Delete items |
| /users | POST | Register User |
| /auth | POST | Login User |
## Tech Stack :muscle:
- Flask
- Flask-SQLAlchemy
- SQL
- Docker
- Docker Compose
- Kubernetes