This project demonstrates a distributed system using gRPC, Kubernetes, and Go. It includes a simple gRPC service, a client, and deployment to Kubernetes for scalability.
- Go (Golang) - Statically typed, compiled programming language.
- gRPC - High-performance Remote Procedure Call (RPC) framework.
- Protocol Buffers (Protobuf) - Efficient data serialization format.
- Docker - Containerization for microservices.
- Kubernetes - Container orchestration platform.
Ensure you have the following installed:
- Go (≥1.20) - Download Go
- Docker - Download Docker
- Kubernetes (Minikube, Kind, or a cloud provider)
- protoc (Protocol Buffers compiler) - Install protoc
git clone https://github.com/RohanCyberOps/grpc-k8s-go-project.git
cd grpc-k8s-go-project
protoc --go_out=. --go-grpc_out=. proto/helloworld.proto
go run server/server.go
go run client/client.go
docker build -t greeter-server:latest -f Dockerfile .
docker run -p 50051:50051 greeter-server
minikube start
kubectl apply -f k8s/deployment.yaml
kubectl apply -f k8s/service.yaml
kubectl get svc greeter-service
Modify client.go
to use EXTERNAL-IP:50051
, then run:
go run client/client.go
kubectl scale deployment greeter-server --replicas=5
kubectl logs -l app=greeter-server --tail=50 -f
This project is licensed under the MIT License.