Skip to content

Latest commit

 

History

History
84 lines (53 loc) · 2.74 KB

File metadata and controls

84 lines (53 loc) · 2.74 KB

Standalone approuter on SAP BTP, Kyma runtime

Overview

SAP BTP, Kyma runtime is used to develop applications and extensions.

This also brings in the following requirements:

  • Serve static content
  • Authenticate and authorize users
  • Forward to the appropriate identity provider for login
  • Rewrite URLs
  • Dispatch requests to other microservices while propagating user information

All these and more capabilities are provided by SAP Application Router.

There are two options to use the Application Router capabilities in SAP BTP, Kyma runtime.

  • Managed Application Router
  • Standalone Application Router deployed on SAP BTP, Kyma runtime.

You can learn about both options in this blog

In this sample, we will deploy a Standalone Application Router deployed on SAP BTP, Kyma runtime.

Scenario

We will deploy an approuter, expose it over the internet via APIRule. It will be exposing a backend API via its configured destinations and routes.

As a simple backend, we will use an HttpBin application that returns the request headers as a response. Good for understanding flows and troubleshooting.

scenario

Note: Standalone approuter is deployed with 2 replicas. Session stickiness is achieved by configuring the Destination rule

Prerequisites

Steps

  • Create a namespace dev

    kubectl create namespace dev
    kubectl label namespaces dev istio-injection=enabled
  • Deploy the backend service

    kubectl -n dev apply -f k8s/httpbin.yaml
  • Create the XSUAA Instance.

     kubectl -n dev apply -f k8s/xsuaa-service-instance.yaml
  • Create the destinations and routes configurations for the approuter

    kubectl -n dev apply -f k8s/config.yaml
  • Deploy the approuter

    kubectl -n dev apply -f k8s/deployment.yaml
  • Expose the approuter via APIRule

    • Update the APIRule. Replace {CLUSTER_DOMAIN} with the domain of your cluster.

      kubectl -n dev apply -f k8s/api-rule.yaml

Accessing the Application

The approuter is exposed at https://my-approuter.{CLUSTER_DOMAIN}. Access the URL https://my-approuter.{CLUSTER_DOMAIN}/sap/com/httpbin/headers to get all the request headers