Skip to content

wanted to get into devOPS so here is a simple implementation of gRPC->unary,server-client & bidirectional

Notifications You must be signed in to change notification settings

PraneGIT/gRPC-complete

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gRPC Complete

This is a simple gRPC project that demonstrates unary,client-server,bidirectional communication between a server and a client using Go programming language, while attempting a simple implementation of containerization and creating a pod/deployment.

Project Structure

  • client: Contains the client-side code.
  • server: Contains the server-side code.
  • proto: Contains the Protocol Buffers definition file (greet.proto) and generated gRPC code.
  • go.mod and go.sum: Go module files.
  • Dockerfile: Dockerfile for building Docker image containing both server and client.
  • deployment.yaml: Kubernetes Deployment file.
  • service.yaml: Kubernetes Service file.
  • README.md: Instructions and information about the project.

Getting Started

Prerequisites

Running Locally

  1. Clone this repository:

    git clone https://github.com/PraneGIT/gRPC-complete.git
  2. Navigate to the project directory:

    cd GRPC
  3. Build and run the server:

    cd server
    go run *.go
  4. In another terminal window, build and run the client:

    cd client
    go run *.go

Docker Deployment

  1. Build the Docker images:

    docker build -t grpc-app .
  2. Tag the Docker image:

    docker tag grpc-app <your-docker-username>/grpc-app:latest
  3. Push the Docker image to Docker Hub:

    docker push <your-docker-username>/grpc-app:latest
  4. Run the Docker container:

    docker run -p 8080:8080 grpc-app

Kubernetes Deployment

  1. Apply the Kubernetes manifests:

    kubectl apply -f deployment.yaml
    kubectl apply -f service.yaml
  2. Verify the deployment:

    kubectl get pods
    kubectl get services

About

wanted to get into devOPS so here is a simple implementation of gRPC->unary,server-client & bidirectional

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published