ekhabarov / bazel-k8s-envoy

Demo: build gRPC micoservices with Bazel and deploy them to k8s

Home Page:https://ekhabarov.com/envoy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Envoy proxy as an API gateway. Built with Bazel. Deployed into Kubernetes.

Blog post with detailed explanation.

Links

Usage

  1. Install and start minikube.
  2. Install Bazelisk.
  3. Run Tilt.
% bazel run //tools:tilt-up

% grpcurl -plaintext \
  -d '{"name": "Bazel"}' \
  127.0.0.1:55000 svc.ServiceOne.Hello

{
  "body": "Hello, Bazel"
}

% curl -i \
  -H 'token: abc' \
  http://localhost:8080/v1/hello\?name\=Bazel


HTTP/1.1 200 OK
content-type: application/json
x-envoy-upstream-service-time: 2
grpc-status: 0
grpc-message:
content-length: 28
date: Tue, 21 Sep 2021 23:33:27 GMT
server: envoy

{
 "body": "Hello, Bazel"
}

% bazel run //tools:tilt-down

NOTE: Until service-one become available, Envoy will return HTTP 503: upstream connect error or no healthy upstream

About

Demo: build gRPC micoservices with Bazel and deploy them to k8s

https://ekhabarov.com/envoy

License:MIT License


Languages

Language:Starlark 93.6%Language:Go 6.1%Language:Shell 0.4%