Small example to try using Dapr to implement services in kubernetes, using gRPC for comms.
Simple two applications in go, a server app that exposes a service over gRPC and a client app that calls the server.
client also exposes a http endpoint that you can curl to trigger the backend server and see the output.
server exposes the services through Dapr and client uses Dapr to call server.
/-----------------------------------\ /-----------------------------------\
O | +--------+ +-----+ | | +------+ +-------+ |
/|\ - http - | -> | client | - grpc -> | dapr| - | - | -> | dapr | - grpc -> | server| |
/ \ | +--------+ +-----+ | | +------+ +-------+ |
| CLIENT POD | | SERVER POD |
\-----------------------------------/ \-----------------------------------/
Uses Kind for local cluster and Ko for deployments.
-
Run the scripts under
./deployments/kind
to create a local kind cluser and install dapr. -
Run
.apply.sh
to deploy the application locally.