A step-by-step introduction to running your app in Kubernetes. For Generation X, but not only. Part I

Part One. Old-fashioned app.

© The Spruce / Julia Hartbeck
fastapi
uvicorn[standard]
pylint
pip3 install -r requirements.txt
import uvicorn

from fastapi import FastAPI
from fastapi.logger import logger


app = FastAPI()


@app.get("/hello")
def hello():
logger.warning('Request!')
return {"Hello": "World"}


if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=9000)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store