Stay organized with collections
Save and categorize content based on your preferences.
Create an app with configuration dependencies
In this quickstart, you set up an application with configuration dependencies
based on a sample application and then deploy parts of the app separately.
Before you begin
Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
To open the workspace based on Bank of Anthos, in VS Code, click File >
Open folder and then navigate to the folder where the repository was
cloned.
Double-click the skaffold.yaml file.
The file contains multiple configurations, separated by YAML document
separators (---). Each configuration can be deployed or referenced as a
dependency separately.
---apiVersion:skaffold/v2beta18kind:Config
Configurations with a name specified are known as Skaffold modules.
The following excerpt defines the frontend module.
metadata:name:frontend# module defining frontend service
Dependencies between configurations are specified using the configs
tag. Required configurations must be deployed before the current
configuration. The sample shows a dependency that's defined in the same
file. The configs tag can also reference other skaffold.yaml files in
the current project.
requires:-configs:[db]
Deploying modules
Open the Command Palette (Ctrl/Cmd+Shift+P) and then run
Cloud Code: Run on Kubernetes.
Click Select modules.
Choose the modules that you want to deploy and then click OK.
If you click db, the db config and the setup config that it
requires are built.
When prompted, choose an image registry and then press Enter.
Cleaning up
After you terminate your application, all Kubernetes resources deployed during
the run are deleted automatically.
To avoid incurring charges to your account for other resources used in this
quickstart, be sure to delete the cluster and project you created.
If you're using Google Cloud and would like to delete just your cluster, you
can do so by following these steps:
Click Cloud Code and then expand the Kubernetes explorer.
Hold the pointer over your cluster name and then click
open_in_newOpen in Google Cloud console.
Click Delete and then click Delete.
To delete your project (and associated resources, including any clusters):
Go to the Projects page in the Google Cloud console:
[[["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-25 UTC."],[[["\u003cp\u003eThis guide demonstrates how to set up an application with configuration dependencies and deploy parts of it separately using Skaffold modules.\u003c/p\u003e\n"],["\u003cp\u003eSkaffold modules, defined by a name within the \u003ccode\u003eskaffold.yaml\u003c/code\u003e file, allow for the separate deployment of configurations, including defining dependencies via the \u003ccode\u003econfigs\u003c/code\u003e tag.\u003c/p\u003e\n"],["\u003cp\u003eTo deploy selected modules, use the "Cloud Code: Run on Kubernetes" command in VS Code, and select the desired modules.\u003c/p\u003e\n"],["\u003cp\u003eThe guide highlights the cleanup process, including the automatic deletion of Kubernetes resources after application termination and instructions for manually deleting the cluster or project in Google Cloud.\u003c/p\u003e\n"],["\u003cp\u003eThe guide directs to further resources such as learning about Skaffold modules, language specific debugging, and configuring settings.\u003c/p\u003e\n"]]],[],null,["# Create an app with configuration dependencies\n=============================================\n\nIn this quickstart, you set up an application with configuration dependencies\nbased on a sample application and then deploy parts of the app separately.\n\nBefore you begin\n----------------\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Google Kubernetes Engine API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=container.googleapis.com)\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Google Kubernetes Engine API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=container.googleapis.com)\n\n1. Install [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git). Git is required for copying samples to your machine.\n2. Install the [Cloud Code plugin](/code/docs/vscode/install#installing) if you haven't already.\n\nCreating an application\n-----------------------\n\n1. Clone the Bank of Anthos repository:\n\n 1. In the top menu bar, click **Terminal** \\\u003e **New Terminal**.\n 2. Clone the Bank of Anthos repository:\n\n git clone https://github.com/GoogleCloudPlatform/bank-of-anthos.git\n\n2. To open the workspace based on Bank of Anthos, in VS Code, click **File** \\\u003e\n **Open folder** and then navigate to the folder where the repository was\n cloned.\n\n3. Double-click the `skaffold.yaml` file.\n\n 1. The file contains multiple configurations, separated by YAML document\n separators (`---`). Each configuration can be deployed or referenced as a\n dependency separately.\n\n ---\n apiVersion: skaffold/v2beta18\n kind: Config\n\n 2. Configurations with a name specified are known as *Skaffold modules* .\n The following excerpt defines the `frontend` module.\n\n metadata:\n name: frontend # module defining frontend service\n\n 3. Dependencies between configurations are specified using the `configs`\n tag. Required configurations must be deployed before the current\n configuration. The sample shows a dependency that's defined in the same\n file. The `configs` tag can also reference other `skaffold.yaml` files in\n the current project.\n\n requires:\n - configs: [db]\n\nDeploying modules\n-----------------\n\n1. Open the Command Palette (`Ctrl`/`Cmd`+`Shift`+`P`) and then run **Cloud Code: Run on Kubernetes**.\n2. Click **Select modules**.\n3. Choose the modules that you want to deploy and then click **OK**.\n\n If you click **db** , the **db** config and the **setup** config that it\n requires are built.\n4. When prompted, choose an image registry and then press `Enter`.\n\nCleaning up\n-----------\n\nAfter you terminate your application, all Kubernetes resources deployed during\nthe run are deleted automatically.\n\nTo avoid incurring charges to your account for other resources used in this\nquickstart, be sure to delete the cluster and project you created.\n\nIf you're using Google Cloud and would like to delete just your cluster, you\ncan do so by following these steps:\n\n1. Click **Cloud Code** and then expand the **Kubernetes** explorer.\n2. Hold the pointer over your cluster name and then click open_in_new **Open in Google Cloud console**.\n3. Click **Delete** and then click **Delete**.\n\nTo delete your project (and associated resources, including any clusters):\n\n1. Go to the Projects page in the Google Cloud console:\n\n [Go to the Projects page](https://console.cloud.google.com/project)\n2. Select the project that you created for this quickstart and then click\n **Delete**.\n\n3. Type the project ID to confirm and then click **Shut down**.\n\n This shuts down the project and schedules it for deletion.\n\nWhat's next\n-----------\n\n- Learn more about [Skaffold modules](/code/docs/vscode/skaffold-modules).\n- Learn about the language-specific [debugging support](/code/docs/vscode/debug) in Cloud Code.\n- Customize your Cloud Code experience by configuring [settings](/code/docs/vscode/configuring-settings)."]]