After successfully installing your Secret, create a service instance and a service binding.
Note
This section provides an example with the Authorization and Trust Management (xsuaa
) service. Create your Secret following this example:
-
To create a service instance, run the following script:
kubectl create -f - <<EOF apiVersion: services.cloud.sap.com/v1 kind: ServiceInstance metadata: name: {SERVICE_INSTANCE_NAME} namespace: default spec: serviceOfferingName: xsuaa servicePlanName: application externalName: {SERVICE_INSTANCE_NAME} EOF
[!TIP] To find values for the serviceOfferingName and servicePlanName parameters, go to the SAP BTP cockpit > Service Marketplace, select the service's tile, and find the name and Plan. The value of the externalName parameter must be unique.
-
To check the output, run:
kubectl get serviceinstances.services.cloud.sap.com {SERVICE_INSTANCE_NAME} -o yaml
You see the status
Created
and the messageServiceInstance provisioned successfully
. -
To create a service binding, run this script:
kubectl create -f - <<EOF apiVersion: services.cloud.sap.com/v1 kind: ServiceBinding metadata: name: {BINDING_NAME} namespace: default spec: serviceInstanceName: {SERVICE_INSTANCE_NAME} externalName: {BINDING_NAME} secretName: {BINDING_NAME} EOF
-
To check the output, run:
kubectl get servicebindings.services.cloud.sap.com {BINDING_NAME} -o yaml
You see the status
Created
and the messageServiceBinding provisioned successfully
. -
Now, use a given service in your Kyma cluster. To see credentials, run:
kubectl get secret {BINDING_NAME} -o yaml
You can use the Secret to communicate with the service instance.