Introduction to Cloud Run
Serverless container workloads.
We'll cover the following
In the last lesson, we had a complete review of GKE. But, if you are a developer and don’t want to get your hands dirty with complex cluster management for your containerized workloads, then Cloud Run is for you.
Introduction
Cloud Run allows us to run stateless containers in a serverless manner. Cloud Run supports event-based invocation of containers. Also, the service deployed to cloud run can also be accessed in other cloud platforms. We have 2 options to run a containerized workload in Cloud Run.
-
Application container running on a cluster totally managed by Google Cloud.
-
Application container running on a cluster created by us.
Cloud Run is backed by Knative. Knative is an extension of the Kubernetes and because of Knative, Cloud Run can start containers based on an event. HTTP trigger is default and can not be removed from Cloud Run. We can add different event-based triggers along with HTTP.
Usecases
When to use Cloud Run? Well, you can use Cloud Run for every workload which has stateless containers and also when you need something which can scale down to 0 when there is no traffic. On-demand computing is also the best use case for Cloud Run.
Some example use-cases:
- Web services REST APIs backend
- Lightweight data transformation
- Business workflow with webhooks
You can look at these use cases in detail here.
Whenever you need to deploy the containers on an environment where you can scale down to 0 or need event-based triggers for your containerized workload, Cloud Run is the best choice.
Demo
-
Open Main menu > Cloud Run
-
Click on the “Create Service” button. Required APIs will be enabled automatically after you click the button.
Get hands-on with 1400+ tech skills courses.