This sample provides a Serverless Function configured as an API endpoint for communication with the MS SQL database that you can find in the database-mssql
folder. You can also configure the API endpoint to use the database example provided in the database-azure-mssql
folder. The deployment.yaml
defines the Function definition as well as an APIRule to expose the Function without authentication. The Deployment contains the following parameters for the database-mssql
example that you can configure to modify the default options:
Parameter | Value |
---|---|
database | DemoDB |
host | mssql.dev.svc.cluster.local |
password | Yukon900 |
username | sa |
Note: If you use the
database-azure-mssql
example, remove the parameters provided by the Function and use the ServiceInstance instead.
This sample demonstrates how to:
- Create a development Namespace in the Kyma runtime.
- Deploy a Serverless Function and an APIRule.
- SAP BTP, Kyma runtime instance
- kubectl configured to use the
KUBECONFIG
file downloaded from the Kyma runtime
-
Create a new
dev
Namespace:kubectl create namespace dev kubectl label namespaces dev istio-injection=enabled
-
Apply the Deployment:
kubectl -n dev apply -f ./k8s/deployment.yaml
-
Verify that the Function is up and running:
kubectl -n dev get function api-mssql-function
-
Use the APIRule:
https://api-mssql-function.{cluster-domain}/orders
https://api-mssql-function.{cluster-domain}/orders/10000001