This repo contains resources that can be used to setup a mock environment for testing Envoy as an inter Data Center traffic manager. It has links to docker images of dummy apps that are used in the setup. It also provides kubernetes resources used for deploying these apps along with envoy to mock 2 differnt DCs, in a k8s cluster.
Dummy REST App
Dummy gRPC App
REST App Docker Image
gRPC App Docker Image
- Local k8s cluster (Docker Desktop or Minikube), where the mock environment will be setup
- kubectl to create, edit and retrieve k8s resources
- cURL or Postman for hitting the REST endpoint
- grpcurl or BloomRPC for hitting the gRPC service
foo@bar:~$ git clone https://github.com/amalaruja/envoy-inter-dc-traffic-manager-blog.git
foo@bar:~$ cd envoy-inter-dc-traffic-manager-blog
foo@bar:~$ kubectl apply -f ./k8s
foo@bar:~$ curl localhost:30081/hello-rest-service/hello
Hello from DC 1!
foo@bar:~$ grpcurl --plaintext --import-path ./proto -proto hello.proto localhost:30081 HelloGrpcService/Hello
{
"reply": "Hello from DC 1!"
}
foo@bar:~$ curl localhost:30082/hello-rest-service/hello
Hello from DC 2!
foo@bar:~$ grpcurl --plaintext --import-path ./proto -proto hello.proto localhost:30082 HelloGrpcService/Hello
{
"reply": "Hello from DC 2!"
}