Cloud Run as an internal async worker

Cloud Pub/Sub + Cloud Run


Knative Eventing to Cloud Run

Create a Cloud Pub/Sub topic

gcloud pubsub topics create cloudrun-atamel-topic

Create a bucket and enable notifications

gsutil mb gs://cloudrun-atamel-bucket/
gsutil notification create -t cloudrun-atamel-topic -f json gs://cloudrun-atamel-bucket/

Deploy Cloud Run Service

gcloud builds submit --tag
gcloud beta run deploy vision-csharp --image

Integrate with Cloud Pub/Sub

gcloud projects add-iam-policy-binding cloudrun-atamel --role=roles/iam.serviceAccountTokenCreator
gcloud iam service-accounts create cloud-run-pubsub-invoker --display-name "Cloud Run Pub/Sub Invoker"
gcloud beta run services add-iam-policy-binding vision-csharp --role=roles/run.invoker
gcloud beta pubsub subscriptions create cloudrun-atamel-subscription --topic cloudrun-atamel-topic --push-endpoint=

The Moment of Truth!




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Mete Atamel

I'm a Developer Advocate at Google Cloud, helping developers with serverless and orchestration technologies