SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Create Kyma Function and a Microservice via UI

In this tutorial, you will use Kyma UI to create a Kyma Function and a microservice.

Overview

🎓 beginner 15 min. SAP Btp, Kyma RuntimeBeginnerSAP Business Technology Platform

You will learn

  • โœ”How to enter Kyma dashboard
  • โœ”How to create a Kyma Function
  • โœ”How to create a Kyma microservice
Created by December 17, 2024
Contributors

Prerequisites

Prerequisites

Steps

Windows macOS Linux BAS
Step 1 Create a "hello-world" Kyma Function in Kyma Dashboard
โ€”

  1. In your Kyma dashboard, go to Namespaces and choose the default namespace.

  2. Choose Edit, switch the sidecar injection toggle to enable Istio sidecar injection, and select Save.

    If you create a Function in a namespace with Istio sidecar injection enabled, an Istio sidecar proxy is automatically injected to the Function’s Pod during its creation. This makes the Function part of the Istio service mesh. To expose a workload using an APIRule custom resource, it is required to include the workload in the Istio service mesh.

  3. Go to Workloads > Functions and choose Create.

  4. Fill in the form in the Create Function view using the following details and choose Create.

    • Template: Default
    • Name: hello-world
    • Language: JavaScript
    • Runtime: node.js 20
    • Function Profile: XS
  5. Creating a Function takes a few seconds. Select the newly created hello-world Function. Scroll down, and notice that it does not have any APIRules yet, you need to create one to define the rules of accessing the Function using APIs.

  6. Go to Discovery and Network > API Rules and choose Create.

  7. Fill in the form in the Create API Rule view using the following details and choose Create.

    • Name: hello-world
    • Service Name: hello-world
    • Port: 80
    • Leave the pre-defined details in the Gateway section
    • Host: hello-world
    • Access Strategy: No Auth
  8. The hello-world APIRule is created. Scroll down to Virtual Service, copy the URL under Hosts, and paste it in your browser.

    APIRule Virtual Service
    APIRule Virtual Service

    A browser window opens showing the following result:

    Hello World from the Kyma Function hello-world running on nodejs20!

Step 2 Deploy a microservice in Kyma
+
Step 3 Create a Service
+
Step 4 Expose the microservice
+
Step 5 Create sample content for your Service
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 5
1. Create a "hello-world" Kyma Function in Kyma Dashboard 2. Deploy a microservice in Kyma 3. Create a Service 4. Expose the microservice 5. Create sample content for your Service

Learn more →