https://github.com/dark-art108/flask8
A minimal template for putting a flask app onto a Kubernetes Cluster.
https://github.com/dark-art108/flask8
cloud flask kubernetes
Last synced: 3 months ago
JSON representation
A minimal template for putting a flask app onto a Kubernetes Cluster.
- Host: GitHub
- URL: https://github.com/dark-art108/flask8
- Owner: DARK-art108
- Created: 2022-06-26T14:56:36.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-26T17:59:09.000Z (about 4 years ago)
- Last Synced: 2025-03-01T07:16:51.547Z (over 1 year ago)
- Topics: cloud, flask, kubernetes
- Language: Python
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## FlasK8 - A minimal template for setting up Flask REST API in Kubernetes.
### Setup Instruction
* docker build --tag ritesh2000/ml-score-api .
* docker run --rm --name test-api -p 5000:5000 -d ritesh2000/ml-score-api
* curl http://localhost:5000/score \
--request POST \
--header "Content-Type: application/json" \
--data '{"X": [1, 2]}'
* docker push ritesh2000/ml-score-api
* kubectl create deployment ml-score-api --image=ritesh2000/ml-score-api:latest
* kubectl port-forward 5000:5000
* kubectl expose deployment ml-score-api --port 5000 --type=LoadBalancer --name ml-score-api-lb