Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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.

License

Notifications You must be signed in to change notification settings

RohanCyberOps/grpc-k8s-go-project

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gRPC + Kubernetes + Go Distributed System

Overview

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.

Technologies Used

  • 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.

Prerequisites

Ensure you have the following installed:

Setup & Installation

1. Clone the Repository

git clone https://github.com/RohanCyberOps/grpc-k8s-go-project.git
cd grpc-k8s-go-project

2. Generate gRPC Code

protoc --go_out=. --go-grpc_out=. proto/helloworld.proto

3. Run the gRPC Server Locally

go run server/server.go

4. Run the gRPC Client

go run client/client.go

Running with Docker

1. Build Docker Image

docker build -t greeter-server:latest -f Dockerfile .

2. Run Container

docker run -p 50051:50051 greeter-server

Deploy to Kubernetes

1. Start Kubernetes Cluster

minikube start

2. Deploy gRPC Server to Kubernetes

kubectl apply -f k8s/deployment.yaml
kubectl apply -f k8s/service.yaml

3. Get Service IP

kubectl get svc greeter-service

4. Update Client to Use Kubernetes Service IP

Modify client.go to use EXTERNAL-IP:50051, then run:

go run client/client.go

Scaling & Monitoring

1. Scale Pods

kubectl scale deployment greeter-server --replicas=5

2. Monitor Logs

kubectl logs -l app=greeter-server --tail=50 -f

License

This project is licensed under the MIT License.

About

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.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.