[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[[["\u003cp\u003eSkaffold is a command-line tool for continuous development of Kubernetes-native applications, managing building, pushing, and deploying processes, and it powers Cloud Code.\u003c/p\u003e\n"],["\u003cp\u003eSkaffold supports dividing an application pipeline into separate modules, each with its own configuration, which can be located in the same or different \u003ccode\u003eskaffold.yaml\u003c/code\u003e files.\u003c/p\u003e\n"],["\u003cp\u003eModules enable independent development and debugging of application parts, with Skaffold managing dependencies and deployment order, and can be specified by giving them a name with the \u003ccode\u003e.metadata.name\u003c/code\u003e field.\u003c/p\u003e\n"],["\u003cp\u003eSkaffold modules are particularly useful in microservice development, allowing developers to focus on specific modules while managing dependencies on others, even across teams.\u003c/p\u003e\n"],["\u003cp\u003eCloud Code IDEs are used to edit Skaffold YAML files, ensuring the accuracy of module definitions, such as preventing cyclic dependencies or non-unique module names.\u003c/p\u003e\n"]]],[],null,["# Skaffold modules in Cloud Code for Cloud Shell\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/shell/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/shell/config-dependencies)\n- [Debugging a Kubernetes application](/code/docs/shell/debug)\n- [Running a Kubernetes application](/code/docs/shell/run-application)"]]