An open API service indexing awesome lists of open source software.

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.

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