Stay organized with collections Save and categorize content based on your preferences.
This page shows you how to deploy a service to Cloud Run using Cloud Code for VS Code.
Deploying a service to Cloud RunTo deploy your service to Cloud Run:
Open the command palette (press Ctrl
/Cmd
+Shift
+P
or click View > Command Palette) and then run the Deploy to Cloud Run command.
In the Deploy to Cloud Run pane, set your Google Cloud project.
Select a preexisting service or create a new one.
If you're creating a new service, choose your platform preferences under Deployment Platform, either Cloud Run (fully managed) or Knative serving. For help choosing the best option for your development needs, see the Choosing your platform guide.
If you selected Cloud Run (fully managed), choose a region to deploy to. If you selected Knative serving, configure the Kubernetes cluster information.
Note: Cloud Code can only deploy to Knative serving if Knative serving is enabled as a feature on the GKE cluster. It is not compatible with the newer version of Knative serving which is installed as an Anthos fleet component with Cloud Service Mesh. The free trial period for Knative serving ended on September 30, 2021. See the GA version documentation for details about installing Cloud Run for Anthos as an Anthos fleet component with Anthos Service Mesh. The past version has been archived but the documentation remains available for existing users.(Optional) To specify additional settings like service account, environment variables, and SQL connections, expand the Advanced revision settings section.
The following environment variables are automatically added to the running containers:
Name Description Example PORT The port your HTTP server should listen on. 8080 K_SERVICE The name of the Cloud Run service being run. hello-world K_REVISION The name of the Cloud Run revision being run. hello-world.1 K_CONFIGURATION The name of the Cloud Run configuration that created the revision. hello-worldUnder Build environment, specify whether to build locally or using Cloud Build.
Specify your builder (Docker or Buildpack) and its settings.
After you define your preferred settings, click Deploy.
Cloud Code for VS Code builds your image, pushes it to the registry, and deploys your service to Cloud Run. Your service is now live!
View your running service by following the URL displayed in the webview.
You can also view details of your running service by clicking the Show Detailed Logs button and looking through your verbose logs in the output window.
After your session completes, right-click to use the following commands:
If you've turned off watch mode in your launch configuration and you want to make changes to your application and rebuild and redeploy the application, click the Cloud Code status bar and then click Turn on watch mode.
To send feedback, report issues on
GitHub, or ask a question on
Stack Overflow.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["This guide details how to deploy a service to Cloud Run using Cloud Code for VS Code directly from the command palette."],["You can choose between deploying to Cloud Run (fully managed) or Knative serving, each with their own configuration steps, such as selecting a region or configuring Kubernetes cluster details."],["During deployment, Cloud Code builds your image, pushes it to the registry, and makes your service live on Cloud Run, with options to use local or Cloud Build."],["Post-deployment, you can access your service's URL in the webview, view logs, and manage your application, including turning on or off watch mode for changes."],["The running container will have access to the environment variables such as, the service's port, name, revision and configuration, to help maintain the application."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4