You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Cloud Run is a fully managed container platform on Google Cloud that lets you run stateless containers invoked via HTTP requests or events. It abstracts away all infrastructure management — you deploy a container image, and Google Cloud handles scaling, load balancing, TLS, and networking.
Cloud Run is a serverless container runtime built on the open-source Knative project. Unlike Cloud Functions, which deploys source code, Cloud Run deploys container images. This means you can run any application that listens on a port and can be packaged as a container — regardless of language, framework, or binary dependencies.
| Characteristic | Description |
|---|---|
| Container-based | Run any container that listens on a port (defaults to 8080) |
| Serverless | No clusters to manage — scales automatically |
| Scale to zero | No charges when no requests are being served |
| Any language | Use any programming language, framework, or library |
| Knative-compatible | Built on Knative, ensuring portability |
| Fully managed | Google manages networking, TLS, scaling, and infrastructure |
Cloud Run offers two resource types:
Services are long-running processes that handle incoming HTTP requests or events. Each service has a stable HTTPS endpoint. Services auto-scale based on incoming request volume and can scale to zero when there is no traffic.
Jobs execute a container to completion and then stop. Jobs do not listen on a port or serve HTTP requests. They are ideal for batch processing, data migration, scheduled tasks, and one-off scripts. Jobs can run as a single task or be parallelised across multiple tasks.
You can deploy a service from a container image in Artifact Registry, Docker Hub, or any other container registry.
# Deploy from a container image
gcloud run deploy my-service \
--image europe-west2-docker.pkg.dev/my-project/my-repo/my-app:latest \
--platform managed \
--region europe-west2 \
--allow-unauthenticated
You can also deploy directly from source code. Cloud Run uses Google Cloud Buildpacks to automatically detect the language and build a container image.
# Deploy from source code (auto-builds a container)
gcloud run deploy my-service \
--source . \
--region europe-west2
Cloud Run scales automatically based on incoming requests:
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.