You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Standalone Application Router on SAP BTP, Kyma Runtime
2
2
3
-
## Overview
3
+
## Context
4
4
5
-
SAP BTP, Kyma runtime is used to develop applications and extensions.
5
+
SAP BTP, Kyma runtime is used to develop applications and extensions. The development process requires:
6
6
7
-
This also brings in the following requirements:
8
-
9
-
- Serve static content
10
-
- Authenticate and authorize users
11
-
- Forward to the appropriate identity provider for login
12
-
- Rewrite URLs
13
-
- Dispatch requests to other microservices while propagating user information
7
+
- Serving static content
8
+
- Authenticating and authorizing users
9
+
- Forwarding to the appropriate identity provider for logging in
10
+
- Rewriting URLs
11
+
- Dispatching requests to other microservices while propagating user information
14
12
15
13
All these and more capabilities are provided by [SAP Application Router](https://help.sap.com/products/BTP/65de2977205c403bbc107264b8eccf4b/01c5f9ba7d6847aaaf069d153b981b51.html).
16
14
17
-
There are two options to use the Application Router capabilities in SAP BTP, Kyma runtime.
15
+
You can use the application router capabilities in SAP BTP, Kyma runtime either as:
18
16
19
-
- Managed Application Router
20
-
- Standalone Application Router deployed on SAP BTP, Kyma runtime.
17
+
- Managed Application Router, or
18
+
- Standalone Application Router deployed on SAP BTP, Kyma runtime
21
19
22
-
You can learn about both options in this [blog](https://blogs.sap.com/2021/12/09/using-sap-application-router-with-kyma-runtime/)
20
+
For more information on both options, see the [Using SAP Application Router with Kyma runtime](https://blogs.sap.com/2021/12/09/using-sap-application-router-with-kyma-runtime/) blog post.
23
21
24
-
In this sample, we will deploy a Standalone Application Router deployed on SAP BTP, Kyma runtime.
22
+
This sample shows how to deploy a standalone Application Router on SAP BTP, Kyma runtime.
25
23
26
24
## Scenario
27
25
28
-
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.
26
+
In this scenario, you deploy an application router and expose it over the internet using an APIRule custom resource. The APIRule exposes a backend API using configured destinations and routes.
29
27
30
-
As a simple backend, we will use an HttpBin application that returns the request headers as a response. Good for understanding flows and troubleshooting.
28
+
The backend is a simple HttpBin application that returns request headers as a response.
31
29
32
-

30
+

33
31
34
-
> Note: Standalone approuter is deployed with 2 replicas. Session stickiness is achieved by configuring the [Destination rule](k8s/deployment.yaml)
32
+
> [!Note]
33
+
> A standalone application router is deployed with 2 replicas. To achieve session affinity, you must configure the [DestinationRule](k8s/deployment.yaml). Session affinity allows all subsequent traffic and requests from an initial client session to be passed to the same replica.
35
34
36
35
## Prerequisites
37
36
@@ -40,49 +39,49 @@ As a simple backend, we will use an HttpBin application that returns the request
40
39
41
40
## Steps
42
41
43
-
- Export environment variables
42
+
1. Export environment variables:
44
43
45
-
```shell
46
-
export NS={your-namespace}
47
-
```
44
+
```shell
45
+
export NS={your-namespace}
46
+
```
48
47
49
-
- Create the namespace and enable istio-injection if not already done.
48
+
2. Create a namespace and enable istio-injection, if not done yet:
- Create the XSUAA Instance. Update the [service instance definition](k8s/xsuaa-service-instance.yaml). Replace {CLUSTER_DOMAIN} with the domain of your cluster.
61
+
4. Create the XSUAA instance. Update the [service instance definition](k8s/xsuaa-service-instance.yaml). Replace {CLUSTER_DOMAIN} with the domain of your cluster.
- Create the destinations and routes configurations for the approuter
67
+
5. Create the destinations and routes configurations for the application router:
69
68
70
-
```shell
71
-
kubectl -n ${NS} apply -f k8s/config.yaml
72
-
```
69
+
```shell
70
+
kubectl -n ${NS} apply -f k8s/config.yaml
71
+
```
73
72
74
-
- Deploy the approuter
73
+
6. Deploy the application router:
75
74
76
-
```shell
77
-
kubectl -n ${NS} apply -f k8s/deployment.yaml
78
-
```
75
+
```shell
76
+
kubectl -n ${NS} apply -f k8s/deployment.yaml
77
+
```
79
78
80
-
- Expose the approuter via APIRule.
79
+
7. Expose the application router using APIRule:
81
80
82
-
```shell
83
-
kubectl -n ${NS} apply -f k8s/api-rule.yaml
84
-
```
81
+
```shell
82
+
kubectl -n ${NS} apply -f k8s/api-rule.yaml
83
+
```
85
84
86
-
## Accessing the Application
85
+
## Access the Application
87
86
88
-
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
87
+
The application router 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.
0 commit comments