ngtrdai197 / grpc-load-balancing-k8s

Just an example to test for load balancing requests to gRPC with k8s :rocket:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GRPC Load Balancing Kubernetes 🎉

Setup

  • Install kubernetes (docker desktop, minukube, ...)
  • GRPC:
# Macos
brew install protobuf

# I’ll make sure it’s installed:
protoc --version

# Install the protocol compiler plugins for Go using the following commands:
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2

# Update your PATH so that the protoc compiler can find the plugins:
export PATH="$PATH:$(go env GOPATH)/bin"
# Apply confimap
kubectl apply -f ./k8s/configmap.yaml

# Apply server-grpc deployment
kubectl apply -f ./k8s/server-deployment.yaml

# Apply client-grpc deployment
kubectl apply -f ./k8s/client-deployment.yaml

How to check the results

  1. Go inside the pod to see
kubectl exec -it <pod name> -- bash
  1. Install k9s

Demo is still in progress (WIP) 🚀

About

Just an example to test for load balancing requests to gRPC with k8s :rocket:


Languages

Language:Go 80.0%Language:Dockerfile 15.5%Language:Makefile 4.5%