This repository contains the code used in the blog blog posts Kyma for Dymmies [2]: First Simple Microservice with Security and Kyma for Dymmies [3]: calling secured service with REST client
There are two prerequisites in order to make use of all parts of the repo:
- GNU Make on your system. For Windows you can either use GNUWin32 or install it via Chocolatey (
choco install make) - needed for theMakefile - REST CLient extension in VSCode - Needed for the
requests.httpfile
-
Clone the repo.
-
Put your DockerHub ID in the file Makefile to replace
<YOUR_DOCKER_ID>. -
Create and push your Docker image via
make push-image. -
Put your DockerHub ID in the file deployment.yaml to replace
<YOUR_DOCKER_ID>. -
Create the relevant objects in Kyma:
- The deployment objects via
kubectl -n <YOUR_NAMESPACE> apply -f ./k8s/deyployment.yaml - The service object via
kubectl -n <YOUR_NAMESPACE> apply -f ./k8s/service.yaml - The API rule object via
kubectl -n <YOUR_NAMESPACE> apply -f ./k8s/apirule.yaml
- The deployment objects via
-
After the deployment to Kyma, fetch the domain of your Kyma cluster and put it in the file requests.http to replace
<YOUR_KYMA_DOMAIN>. -
After the creatiion of the OAuth2 client, put the values for client id and client secret into the file requests.http to replace
<YOUR_CLIENT_ID>and<YOUR_CLIENT_SECRET> -
Execute the calls to the different Kyma endpoints.