This is based on the work done in chapter6 folder.
This folder shows how more advanced features that comes out of the box with gRPC (error handling, interceptors, load balancing, ...). The main code for the implementations can be found in the following files:
$ buf generate proto # or with protoc (see chapter4/README.md)
$ go run ./server 0.0.0.0:50051
$ bazel run //server:server 0.0.0.0:50051
# if not done before `buf generate proto` or with protoc (see chapter4/README.md)
$ go run ./client 0.0.0.0:50051
$ bazel run //client:client 0.0.0.0:50051
In order to show the load balancing effects, this folder introduces configurations for deploying the server and client to Kubernetes.
A Kubernetes is required in order to make the following command work. If you have kind installed, you can run the following command to quickly spin up a cluster:
kind create cluster --config k8s/kind.yaml
.
$ kubectl apply -f k8s/server.yaml
$ kubectl apply -f k8s/client.yaml