Explore your build options with buildpacks, Jib, or Docker

To run or debug an application on Kubernetes, you'll need to set yourpreference for how your container image is built by configuring it in theDevelop on Kubernetes run configuration.

In a project that doesn't contain askaffold.yaml file at the root or doesn'treferenceskaffold.yaml you can use the Cloud Code UI to choosea builder and build environment.

Building locally is free of charge since it uses your own resources. BuildingwithCloud Build is good for slower machines or machines thatdon't match the processor architecture of the target cluster. For informationabout the cost of building your application using Cloud Build, seeCloud Build Pricing.

Specify how your images are built

Cloud Code supportsDocker,Jib, andBuildpacksartifact types.

Without a skaffold.yaml

When importing an existing application without askaffold.yaml file or runningan application that doesn't have askaffold.yaml, you're prompted to specifysettings when initializing.

If you're using one of the Cloud Code sample applications, to usethe UI, delete theskaffold.yaml file before running a build action. For stepsto choose a builder and build environment without the UI, seeManually creating a Skaffold configuration.

  1. In a project without askaffold.yaml file, open the command palette(pressCtrl/Cmd+Shift+P or clickView >Command Palette) andthen runCloud Code: Run on Kubernetes orCloud Code: Debug on Kubernetes.
  2. In theBuild environment section, choose a build environment.
  3. In theDeploy settings section, if you chose Cloud Build,specify the image registry you want Cloud Build to push imagesto.
  4. In theBuild settings section, specify a builder (Docker, Jib, orbuildpacks) for each image and its settings.
  5. Select or clear any of the configuration options and then clickDebugorRun.

The options you choose are saved to askaffold.yaml file that you canedit directly for further customization.

With an existing skaffold.yaml

For a project with an existingskaffold.yaml file, you need to manually edityour build options. Cloud Code provides snippets for common YAMLschema viewable by pressingCommand/Ctrl + Space. See the theSkaffold Build documentationfor more details.

Use Skaffold profiles in Cloud Code

Cloud Code uses the Skaffold tool under the hood to powerCloud Code's build functionality. To configure Cloud Codefor different build or deploy environments such as local or remote builds,Skaffold profiles are used

Create a new skaffold profile

If you'd like to define build, test and deployment configurations fordifferent contexts, you can have different Skaffold profiles.

The following sample shows a profile namedcloudbuild used to to build imageswith Cloud Build:

profiles:# use the cloudbuild profile to build images using Google Cloud Build- name: cloudbuild   build:   googleCloudBuild: {}
If you have multiple profiles, add the profile you want to use to yourlaunch.json file.For more information on Skaffold profiles, see theSkaffold profiles documentation

What's next

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.