Cloud Code for VS Code uses \`skaffold.yaml\` configuration files to provide a seamless development
experience for Kubernetes applications, automating many of the tasks involved in building and
deploying Kubernetes applications. This lets Cloud Code handle the workflow for
building, pushing, and deploying your application, and provides building blocks for creating
CI/CD pipelines.

Projects usually start using a single `skaffold.yaml`
configuration to describe how to build and deploy the application. As a
project grows, it can be useful to break the application pipeline into separate parts.

Cloud Code supports defining multiple
[configuration dependencies](https://skaffold.dev/docs/design/config/#configuration-dependencies),
either placed together in the same `skaffold.yaml` file and separated using YAML
document separators (`---`), or placed in separate `skaffold.yaml`
files that are referenced from a higher-level `skaffold.yaml` file. A
configuration can be made into a *module* by giving it a name using the
`.metadata.name` field.


Using modules allows you to develop and debug parts of the application
independently. Dependencies can be defined between configuration files and to
specific modules.

For steps to use this feature, see
[Developing portions of an application independently](https://docs.cloud.google.com/code/docs/vscode/config-dependencies).

## Debugging applications with modules

You can iteratively develop and debug the entire application or a set of the defined modules.
Cloud Code manages the module dependencies and their order of deployment.

## Getting started with a modules sample

To select modules for your application, see
[Building select modules and their dependencies](https://docs.cloud.google.com/code/docs/vscode/config-dependencies#build-modules).

If you haven't used modules and want to test the feature with a sample, see the
[Guestbook sample](https://github.com/GoogleCloudPlatform/cloud-code-samples/tree/master/nodejs/nodejs-guestbook), which is
modularized into `frontend` and `backend`.

For a large enterprise application sample, developed using various
technologies and languages, and using modules, see the
[Bank of Anthos sample](https://github.com/GoogleCloudPlatform/bank-of-anthos).

## Common use cases

This section outlines some common use case examples that demonstrate
different scenarios of when and how you can use modules in your IDE.
![](https://docs.cloud.google.com/static/code/docs/intellij/images/skaffold-modules-customer-environment-diagram.png)

### Microservice development

You're a frontend developer mostly working on the `frontend`
module. As a microservice, `frontend` doesn't have an explicit code or library
dependency on the `backend` repo, but requires `backend` to be deployed and running
in the cluster.

You use your project that contains a `frontend` module definition to deploy and debug from a Cloud Code IDE to a shared development cluster where the backend team also deploys their service. The DevOps team maintains this shared cluster.

You don't work with or debug `backend` code or update Kubernetes
configs most of the time. Cloud Code builds and deploys other configurations
that `frontend` requires. You configure Cloud Code
deployment configuration to only iterate on the `frontend` module.

You can also deploy both the `frontend` and `backend` to a local cluster to get a faster iterative experience.

### Cross-boundary microservice development and debugging

When multiple microservices need to be debugged together, you could:

- Open the parent directory where all sub-directories with modules source code are located relative to each other
- Select the root `skaffold.yaml` file for deployment (configs)
- Configure Cloud Code deployment configuration to only iterate on `frontend` and `backend` modules that are available locally (and their respective Kubernetes configuration module when there are changes there).

You could also have a separate root `skaffold.yaml` file for local
development that includes a static data server.

### Smart module YAML editing

You're a DevOps engineer building a template repository for the team of microservice developers which uses modules. You want to ensure there are no errors in module definitions. You use Cloud Code IDEs to edit `skaffold.yaml` configuration files.

## What's next

- [Developing portions of an application independently](https://docs.cloud.google.com/code/docs/vscode/config-dependencies)
- [Debugging a Kubernetes application](https://docs.cloud.google.com/code/docs/vscode/debug)
- [Running a Kubernetes application](https://docs.cloud.google.com/code/docs/vscode/run-application)

## Get Support

To send feedback, ask a question on [Stack Overflow](https://stackoverflow.com/questions/ask?tags=cloud-code-vscode). If you are a Google Cloud customer, you can file tickets through [standard Google Cloud
support channels](https://cloud.google.com/support?e=48754805).