In this tutorial, we will learn how to deploy Flask Microservice as a Serverless Function in OpenFaas. In one of my previous tutorials, we have already seen how to create a  Flask microservice. We will use that microservice as a reference and deploy it on OpenFaas as a Function.

What is Serverless?

Serverless is an architectural pattern where the business logic are written as functions that can be executed in a stateless manner. Serverless does not mean executing code without servers. It merely means we don’t have to provision for hardware and infrastructure while writing our code. The application still runs on servers, which are managed by third-party services.

FaaS OpenFaas

Function-as-a-Service (FaaS) is a serverless model that provides the ability to develop, run, and manage application functionalities without the complex infrastructure mostly associated with building and deploying microservices applications. Building an application by following this model is one way of achieving a serverless architecture, and is typically used when building microservices applications.

Docker and Kubernetes

Docker is a platform that uses OS-level virtualization to deliver software in packages called as containers. Each of these containers bundles its own software, libraries and configuration files. Although, they are isolated from one another, they can communicate with each other through well-defined channels. Containers are a good way of developing and deploying microservices.

Kubernetes is a portable, extensible, and open-source platform that facilitates the automation of the deployment, scaling, and operations of application containers (Docker containers, in this case) across clusters of hosts.

#flask-restful #serverless #flask #openfaas

Serverless with OpenFaas, Kubernetes, and Python
2.10 GEEK