Skaffold는 Kubernetes 네이티브 애플리케이션을 지속적으로 개발할 수 있게 해주는 명령줄 도구입니다. Skaffold는 애플리케이션 빌드, 푸시, 배포 워크플로를 처리하고 CI/CD 파이프라인 만들기를 위한 빌딩 블록을 제공합니다. Skaffold는 Cloud Code를 구동하는 엔진입니다.
Skaffold 프로젝트는 일반적으로 단일 skaffold.yaml 구성을 사용하여 애플리케이션을 빌드하고 배포하는 방법을 기술합니다. 프로젝트가 커지면 애플리케이션 파이프라인을 개별 부분으로 나누는 것이 유용할 수 있습니다.
Skaffold는 동일한 skaffold.yaml 파일에 함께 배치되고 YAML 문서 구분 기호(---)를 사용하여 분리되거나 상위 수준 skaffold.yaml 파일에서 참조되는 별도의 skaffold.yaml 파일에 배치되는 여러 구성 종속 항목을 지원합니다. .metadata.name 필드를 사용하여 이름을 지정하여 모듈에 구성을 수행할 수 있습니다.
모듈을 사용하면 애플리케이션 일부를 독립적으로 개발하고 디버깅할 수 있습니다. 구성 파일 사이에 그리고 특정 모듈에 종속 항목을 정의할 수 있습니다.
이 기능을 사용하는 단계는 애플리케이션의 일부를 독립적으로 개발을 참조하세요.
Skaffold 모듈을 사용하여 애플리케이션 디버깅
전체 애플리케이션 또는 정의된 모듈 집합을 반복적으로 개발 및 디버깅할 수 있습니다.
Skaffold는 모듈 종속 항목과 배포 순서를 관리합니다.
아직 Skaffold 모듈을 사용해 본 적이 없고 샘플로 기능을 테스트하려면 frontend 및 backend로 모듈화된 방명록 샘플을 참조하세요.
다양한 기술과 언어를 사용하고 Skaffold 모듈을 사용하여 개발된 대형 엔터프라이즈 애플리케이션 샘플은 Bank of Anthos 샘플을 참조하세요.
일반 사용 사례
이 섹션에서는 IDE에서 모듈을 사용할 수 있는 시기와 방법에 대한 다양한 시나리오를 보여주는 몇 가지 일반적인 사용 사례 예시를 설명합니다.
마이크로서비스 개발
사용자는 주로 frontend 모듈에서 작업하는 프런트엔드 개발자입니다. 마이크로서비스로서 frontend에는 backend 저장소에 대한 명시적인 코드나 라이브러리 종속 항목이 없지만 클러스터에 배포하고 실행하려면 backend가 요구됩니다.
frontend 모듈 정의가 포함된 Skaffold 기반 프로젝트를 사용하여 백엔드팀도 서비스를 배포하는 공유 개발 클러스터에 Cloud Code IDE를 배포하고 이를 디버깅합니다. 이 공유 클러스터는 DevOps팀에서 유지됩니다.
대부분의 경우 backend 코드를 사용 또는 디버깅하거나 Kubernetes 구성을 업데이트할 필요가 없습니다. Skaffold는 frontend에 필요한 다른 구성을 빌드 및 배포합니다. frontend 모듈에서만 반복하도록 Cloud Code 배포 구성을 구성합니다.
로컬 클러스터에 frontend 및 backend를 모두 배포하면 더 빠른 반복 환경을 얻을 수 있습니다.
교차 경계 마이크로서비스 개발 및 디버깅
여러 마이크로서비스를 함께 디버깅해야 하는 경우 다음을 수행하면 됩니다.
모듈 소스 코드가 있는 모든 하위 디렉터리가 서로 상대적으로 위치한 상위 디렉터리를 엽니다.
배포(구성)할 루트 skaffold.yaml 파일을 선택합니다.
로컬에서 사용할 수 있는 frontend 및 backend 모듈 (및 해당 변경사항이 있는 경우 해당 Kubernetes 구성 모듈)에서만 반복하도록 Cloud Code 배포 구성을 구성합니다.
정적 데이터 서버가 포함된 별도의 로컬 개발용 루트 skaffold.yaml 파일이 있을 수도 있습니다.
스마트 모듈 YAML 수정
사용자는 Skaffold 모듈을 사용하는 마이크로서비스 개발자팀을 위해 템플릿 저장소를 빌드하는 DevOps 엔지니어입니다. 사용자는 수동으로 Skaffold를 실행하지 않고 모듈 정의에 오류가 없는지 확인합니다(순환 종속 항목 또는 고유하지 않은 모듈 이름 등). Cloud Code IDE를 사용하여 Skaffold YAML 구성 파일을 수정하세요.
[[["이해하기 쉬움","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(UTC)"],[[["\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)"]]