Questo contenuto non è disponibile nella lingua selezionata.
Chapter 15. Using a sink binding with Service Mesh
You can use a sink binding with Service Mesh.
15.1. Configuring a sink binding with Service Mesh Copia collegamentoCollegamento copiato negli appunti!
This procedure describes how to configure a sink binding with Service Mesh.
Prerequisites
- You have set up integration of Service Mesh and Serverless.
Procedure
Create a
Serviceobject in a namespace that is member of theServiceMeshMemberRoll:Example
event-display-service.yamlconfiguration fileCopy to Clipboard Copied! Toggle word wrap Toggle overflow Apply the
Serviceobject:oc apply -f event-display-service.yaml
$ oc apply -f event-display-service.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a
SinkBindingobject:Example
heartbeat-sinkbinding.yamlconfiguration fileCopy to Clipboard Copied! Toggle word wrap Toggle overflow Apply the
SinkBindingobject:oc apply -f heartbeat-sinkbinding.yaml
$ oc apply -f heartbeat-sinkbinding.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a
CronJobobject:Example
heartbeat-cronjob.yamlconfiguration fileCopy to Clipboard Copied! Toggle word wrap Toggle overflow Apply the
CronJobobject:oc apply -f heartbeat-cronjob.yaml
$ oc apply -f heartbeat-cronjob.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: Verify that the events were sent to the Knative event sink by looking at the message dumper function logs:
Example command
oc logs $(oc get pod -o name | grep event-display) -c user-container
$ oc logs $(oc get pod -o name | grep event-display) -c user-containerCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow