Create an app with configuration dependencies

In this quickstart, you set up an application with configuration dependenciesbased on a sample application and then deploy parts of the app separately.

Before you begin

  1. 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.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.create permission.Learn how to grant roles.
    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.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Enable the Google Kubernetes Engine API.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enable permission.Learn how to grant roles.

    Enable the API

  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.create permission.Learn how to grant roles.
    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.

    Go to project selector

  6. Verify that billing is enabled for your Google Cloud project.

  7. Enable the Google Kubernetes Engine API.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enable permission.Learn how to grant roles.

    Enable the API

  8. InstallGit. Git is required for copying samples to your machine.
  9. Install theCloud Code plugin if you haven't already.

Creating an application

  1. Clone the Bank of Anthos repository:

    1. In the top menu bar, clickTerminal >New Terminal.
    2. Clone the Bank of Anthos repository:

      git clone https://github.com/GoogleCloudPlatform/bank-of-anthos.git
  2. To open the workspace based on Bank of Anthos, in VS Code, clickFile >Open folder and then navigate to the folder where the repository wascloned.

  3. Double-click theskaffold.yaml file.

    1. The file contains multiple configurations, separated by YAML documentseparators (---). Each configuration can be deployed or referenced as adependency separately.

      ---apiVersion:skaffold/v2beta18kind:Config
    2. Configurations with a name specified are known asSkaffold modules.The following excerpt defines thefrontend module.

      metadata:name:frontend# module defining frontend service
    3. Dependencies between configurations are specified using theconfigstag. Required configurations must be deployed before the currentconfiguration. The sample shows a dependency that's defined in the samefile. Theconfigs tag can also reference otherskaffold.yaml files inthe current project.

      requires:-configs:[db]

Deploying modules

  1. Open the Command Palette (Ctrl/Cmd+Shift+P) and then runCloud Code: Run on Kubernetes.
  2. ClickSelect modules.
  3. Choose the modules that you want to deploy and then clickOK.

    If you clickdb, thedb config and thesetup config that itrequires are built.

  4. When prompted, choose an image registry and then pressEnter.

Cleaning up

After you terminate your application, all Kubernetes resources deployed duringthe run are deleted automatically.

To avoid incurring charges to your account for other resources used in thisquickstart, be sure to delete the cluster and project you created.

If you're using Google Cloud and would like to delete just your cluster, youcan do so by following these steps:

  1. ClickCloud Code and then expand theKubernetes explorer.
  2. Hold the pointer over your cluster name and then clickopen_in_newOpen in Google Cloud console.
  3. ClickDelete and then clickDelete.

To delete your project (and associated resources, including any clusters):

  1. Go to the Projects page in the Google Cloud console:

    Go to the Projects page

  2. Select the project that you created for this quickstart and then clickDelete.

  3. Type the project ID to confirm and then clickShut down.

    This shuts down the project and schedules it for deletion.

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.