Cloud Run Samples
This repository contains sample applications used in Cloud Run documentation.
Sample Index
Sample | Description | Languages |
---|---|---|
Knative Hello World | Hello World! A quickstart sample collection. | Go, Node.js, Python, Java Spring Boot, Java Spark, C#, PHP, Ruby, Kotlin, Scala, Shell |
Manual Logging | Structured logging without client library | Go, Node.js, Python, Java |
System Package | Use system-installed binaries. | Go, Node.js, Java |
Pub/Sub Push | Handle messages from a push subscription | Go, Node.js, Python, Java |
Image Processing | Event-driven image analysis & transformation | Go, Node.js, Python, Java |
Cloud SQL (MySQL) | Use MySQL with Cloud Run | Node.js, Python |
Cloud SQL (Postgres) | Use Postgres with Cloud Run | Node.js, Python |
Service to Service Request | Snippet: Authenticated requests between services | Go |
Global State | Snippet: Using global state for in-memory caching | Go, Nodejs |
Lazy Initialization | Snippet: Lazy loading faster cold start | Go, Nodejs |
Identity Platform | Cloud Run for Anthos + Istio + Identity Platform | GKE |
Istio Authorization | Cloud Run for Anthos + Istio Role-Based Access Control | GKE |
Hello Broken | "Broken" service for troubleshooting. | Go, Node.js |
Samples by Language: nodejs, golang, python, java
Deploy a sample with a button click!
The Cloud Run Button makes your Cloud Run service deployable with the push of a button. (It will open a Cloud Shell window.)
Sample | Cloud Run Button | Details from the Cloud Run Documentation |
---|---|---|
Knative Hello World (Python) | - | |
Manual Logging (Node.js) | Logging guide | |
System Package (Go) | Using system packages tutorial | |
Pub/Sub Push (Go) | Pub/Sub tutorial | |
Image Processing (Go) | Image Processing tutorial | |
Hello Broken (Node.js) | Forthcoming |
Contributing changes
Entirely new samples are not accepted. Bug fixes are welcome, either as pull requests or as GitHub issues.
See CONTRIBUTING.md for details on how to contribute.
Licensing
Code in this repository is licensed under the Apache 2.0. See LICENSE.