Configure Cloud Run services Stay organized with collections Save and categorize content based on your preferences.
This page provides an overview of configuration options forCloud Run services.
Avoid cold starts and reduce latency
You can avoid cold starts for your application and reduce application latency bysetting a minimum number of instances. Note that setting a minimum number ofinstances incurs cost. SeeSet minimum instances for services tolearn more.
Capacity
You can control the amount ofmemory,CPU, andmaximum concurrencya service can use.
Usebilling settings tocontrol how you are charged, either per request and only when the instanceprocesses a request, or for the entire lifecycle of the instance.
Environment variables
You can create key-value pairs for use with your Cloud Runservice. SeeConfigure environment variables for servicesto learn more.
Execution environment
Cloud Run has two execution environments. Learn about thedifferences between bothexecution environments
GPU
If you need to host AI workloads, such as inference models and model training,you can configure Cloud Run services with or withoutGPU.
Guard against high request levels
You can control how many instances your Cloud Run service createsto serve requests by settingmaximum instances andminimum instances. This can help to curbcosts and guard againstabnormally high request levels.
Health checks
Cloud Run lets you configure two types of health check probes.One of the probes determines when the containers is ready to accept traffic, andthe other probe determines whether to restart the container. Learn more aboutcontainer health checks.
Labels
Cloud Run labels are key/valuepairs that you can apply to Cloud Run services, revisions, and Cloud Run functions. Labelshelp you organize your Cloud Run resources, and manage costs at scalewith the granularity you need.
Labels you previously set for your Cloud Run functions using eithergcloud functions commands or the Cloud Functions v2 API propagate to Cloud Run when youdeploy your functions in Cloud Run.
Scaling
By default, Cloud Run automatically scales out to a specified ordefault maximum number of instances, depending on traffic and CPU utilization.However, for some use cases, you might want the ability to set a specific numberof instances, usingmanual scaling.
Secrets
You can useSecret Manager with yourCloud Run to securely store API keys, passwords, and othersensitive information. SeeConfigure secrets to learn more.
Service identity
TheCloud Run service identityis the service account that is used as the authenticated account for accessingGoogle Cloud APIs from your Cloud Run instance container. We recommendthat you create a service account and determine the most minimal set ofpermissions that the service account needs to access specific Google Cloudresources.
Timeouts
You can set aCloud Run request timeout thatspecifies the time within which a response must be returned.
Recommendations
SeeOptimize with Recommender to learn theoptimizations provided by Recommender on Cloud Run.
Traffic splitting
Each time you deploy or redeploy a service, a new revision of the underlyingCloud Run service is automatically created. SeeSession affinity and traffic splittingfor more details.
Tag services
Tags are key-value pairs you can apply to your resources for fine-grained accesscontrol using Cloud Run console.
Tag administrators create tags for resources across Google Cloud at theorganization or project level. Tags provides a way to conditionally allow ordeny policies based on whether a resource has a specific tag. To learn more,seeTag services.
Volume mounts
Cloud Run volume mounts lets you access shared data stored in alocal file system, such as a storage bucket or file server content, from yourcontainer. You can mount aCloud Storage bucket,anNFS share like aFilestore instance, or anin-memory filesystem provided by Cloud Run.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.