[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-05。"],[[["\u003cp\u003eSkaffold is a command-line tool that streamlines the workflow for building, pushing, and deploying Kubernetes-native applications, and is the engine behind Cloud Code.\u003c/p\u003e\n"],["\u003cp\u003eSkaffold supports defining multiple configuration dependencies, which can be organized within a single \u003ccode\u003eskaffold.yaml\u003c/code\u003e file or across multiple files.\u003c/p\u003e\n"],["\u003cp\u003eSkaffold modules allow independent development and debugging of different parts of an application, managing dependencies and deployment order.\u003c/p\u003e\n"],["\u003cp\u003eModules are particularly useful for microservice development, enabling frontend developers to work on their modules while ensuring required backend services are deployed.\u003c/p\u003e\n"],["\u003cp\u003eSmart editing tools in Cloud code IDE's can assist DevOps engineers in the creation and maintainance of Skaffold configuration YAML files.\u003c/p\u003e\n"]]],[],null,["# Skaffold modules in Cloud Code for VS Code\n\n[Skaffold](/skaffold) is a command-line tool that facilitates continuous development\nfor Kubernetes-native applications. Skaffold handles the workflow for building, pushing, and\ndeploying your application, and provides building blocks for creating CI/CD pipelines. Skaffold is\nthe engine that powers Cloud Code.\n\nSkaffold projects usually start using a single `skaffold.yaml`\nconfiguration to describe how to build and deploy the application. As a\nproject grows, it can be useful to break the application pipeline into\nseparate parts.\n\nSkaffold supports defining multiple\n[configuration dependencies](https://skaffold.dev/docs/design/config/#configuration-dependencies),\neither placed together in the same `skaffold.yaml` file and separated using YAML\ndocument separators (`---`), or placed in separate `skaffold.yaml`\nfiles that are referenced from a higher-level `skaffold.yaml` file. A\nconfiguration can be made into a *module* by giving it a name using the\n`.metadata.name` field.\n\n\nUsing modules allows you to develop and debug parts of the application\nindependently. Dependencies can be defined between configuration files and to\nspecific modules.\n\nFor steps to use this feature, see\n[Developing portions of an application independently](/code/docs/vscode/config-dependencies).\n\nDebugging applications with Skaffold modules\n--------------------------------------------\n\nYou can iteratively develop and debug the entire application or a set of the defined modules.\nSkaffold manages the module dependencies and their order of deployment.\n\nGetting started with a Skaffold modules sample\n----------------------------------------------\n\nTo select modules for your application, see\n[Building select Skaffold modules and their dependencies](/code/docs/vscode/config-dependencies#building_select_Skaffold_modules_and_their_dependencies).\n\nIf you haven't used Skaffold modules and want to test the feature\nwith a sample, see the\n[Guestbook sample](https://github.com/GoogleCloudPlatform/cloud-code-samples/tree/master/nodejs/nodejs-guestbook), which is\nmodularized into `frontend` and `backend`.\n\nFor a large enterprise application sample, developed using various\ntechnologies and languages, and using Skaffold modules, see the\n[Bank of Anthos sample](https://github.com/GoogleCloudPlatform/bank-of-anthos).\n\nCommon use cases\n----------------\n\nThis section outlines some common use case examples that demonstrate\ndifferent scenarios of when and how you can use modules in your IDE.\n\n### Microservice development\n\nYou're a frontend developer mostly working on the `frontend`\nmodule. As a microservice, `frontend` doesn't have an explicit code or library\ndependency on the `backend` repo, but requires `backend` to be deployed and running\nin the cluster.\n\nYou use your Skaffold-based 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.\n\nYou don't work with or debug `backend` code or update Kubernetes\nconfigs most of the time. Skaffold builds and deploys other configurations\nthat `frontend` requires. You configure Cloud Code\ndeployment configuration to only iterate on the `frontend` module.\n\nYou can also deploy both the `frontend` and `backend` to a local cluster to get a faster iterative experience.\n\n### Cross-boundary microservice development and debugging\n\nWhen multiple microservices need to be debugged together, you could:\n\n- Open the parent directory where all sub-directories with modules source code are located relative to each other\n- Select the root `skaffold.yaml` file for deployment (configs)\n- 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).\n\nYou could also have a separate root `skaffold.yaml` file for local\ndevelopment that includes a static data server.\n\n### Smart module YAML editing\n\nYou're a DevOps engineer building a template repository for the team of microservice developers which uses Skaffold modules. You want to ensure there are no errors in module definitions without running Skaffold manually (such as cyclic dependencies or non-unique module names). You use Cloud Code IDEs to edit Skaffold YAML configuration files.\n\nWhat's next\n-----------\n\n- [Developing portions of an application independently](/code/docs/vscode/config-dependencies)\n- [Debugging a Kubernetes application](/code/docs/vscode/debug)\n- [Running a Kubernetes application](/code/docs/vscode/run-application)\n\nGet Support\n-----------\n\nTo send feedback, report issues on [GitHub](https://github.com/GoogleCloudPlatform/cloud-code-vscode/issues), or ask a question on [Stack Overflow](https://stackoverflow.com/questions/ask?tags=cloud-code-vscode)."]]