Learn more about the Serverless module. Use it to run lightweight Functions in a cost-efficient and scalable way using JavaScript and Node.js.
The Kyma Serverless module is a "code-as-a-service" tool designed to accelerate the process of prototyping applications by removing the technical overhead necessary to obtain the first testable versions. It allows developers to focus on the coding and easily run it in the context of the SAP BTP without dealing with Kubernetes orchestration or containerization complexities. The fact that no Kubernetes knowledge is required to use it makes Serverless a useful tool for beginners who want to experiment with loosely coupled microservice architecture on Kubernetes or for business consultants who need to provide extension logic for an existing Kubernetes-based system with minimal overhead.
With the Serverless module, you can build, run, and manage serverless applications in Kubernetes. These applications are called Functions, and they are based on the Function custom resource (CR) objects. They contain simple code snippets that implement a specific business logic. For example, you can define that you want to use a Function as a proxy that saves all incoming event details to an external database.
A Function can be triggered by other workloads in the cluster (in-cluster events) or business events coming from external sources. You can subscribe to them using a Subscription CR. You can expose your Function to an external endpoint (HTTPS). With an APIRule CR, you can define who can reach the endpoint and what operations they can perform on it.
The Serverless module provides the following features:
-
Quick deployments following a Function approach
-
Loosely coupled microservice approach
-
Event-driven programming model
-
Reduced implementation and operation effort
-
Function management with Kubernetes resources like Deployments, Services, and HorizontalPodAutoscalers
-
Docker image creation with Kubernetes Jobs
-
User applies the Serverless CR.
-
Serverless Operator watches the Serverless CR.
-
Serverless Operator reconciles the Serverless workloads.
When you add the Serverless module, Serverless Operator takes care of installation and configuration of Serverless in your cluster. It manages the Serverless lifecycle based on the dedicated Serverless CR.
The API of the Serverless module is based on Kubernetes CustomResourceDefinitions (CRDs), which extend the Kubernetes API with custom additions. To inspect the specification of the Serverless module API, see:
To learn how to avoid any potential threats while using Functions, see Function Security.
To learn more about the resources used by the Serverless module, see Serverless.
Related Information
kyma-project.io: Serverless module tutorials