Member-only story
Envoy Gateway: Advanced Routes
gRPC and TCP Routes
In the previous article on Envoy gateway, we covered its Helm deployment and how to configure HTTP/HTTPS routes. This article covers how to set up gRPC and TCP routes.
Backends for Routes
Before we start, we deploy a simple gRPC backend server for the gRPC routes and a Postgres database for the TCP routes.
gRPC backend
We deploy a basic echo gRPC server. The following YAML specification deploys the gRPC server and a Kubernetes service for the server.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: backend-grpc
namespace: gateway-testing
spec:
replicas: 1
selector:
matchLabels:
app: backend-grpc
version: v1
template:
metadata:
labels:
app: backend-grpc
version: v1
spec:
containers:
- image: enm10k/grpc-hello-world
command: ["greeter_server"]
imagePullPolicy: IfNotPresent
name: backend-grpc
ports:
- containerPort: 8080
env:
- name: PORT
value: "8080"
---
apiVersion: v1
kind: Service
metadata:
name: backend-grpc
namespace: gateway-testing
labels:
app: backend-grpc
spec:
ports:
- name: grpc
port: 50001
targetPort: 8080
selector:
app: backend-grpc
version: v1To verify whether this backend is working correctly, we spin up a temporary pod and run some grpcurl…










