Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons

© 2026 BraveProgrammer. All rights reserved.

  1. Courses
  2. /
  3. Go Programming Bootcamp

Lesson 59 of 60 · Go

Deploying a gRPC Service on Google Cloud Run

Duration: 20 minutes

Cloud Run for gRPC

This lesson explains the main concept clearly with beginner-friendly examples and background so you can learn why the code works.

  1. Dockerfile (same as lesson‑47) – expose port 8080.
  2. Build and push the image.
$ docker build -t gcr.io/<PROJECT>/go-grpc .
$ docker push gcr.io/<PROJECT>/go-grpc
  1. Deploy with the gcloud CLI:
$ gcloud run deploy go-grpc \
    --image gcr.io/<PROJECT>/go-grpc \
    --platform managed \
    --region us-central1 \
    --allow-unauthenticated \
    --port 8080
  1. Enable gRPC in the service settings (check Allow unauthenticated invocations and gRPC protocol).
  2. Use the generated client to call the endpoint (ensure grpc.WithTransportCredentials(insecure.NewCredentials())).

Info

Cloud Run automatically scales to zero – perfect for bursty workloads.

Previous: Building an Observability Dashboard with Prometheus & GrafanaNext: Capstone Project – Build a Todo API Service