이 문서에서는 Skaffold 정의, Cloud Deploy에서 Skaffold를 사용하는 방법과 이유, Skaffold 사용을 위해 필요한 작업에 대해 설명합니다.
Cloud Deploy에서 Skaffold는 렌더링 및 배포 작업을 위해 사용됩니다. 또한 로컬 개발, 빌드, 테스트, 고급 배포 기능을 위해 사용할 수도 있습니다. 하지만 Cloud Deploy에는 렌더링 및 적용을 위해 매니페스트를 식별하는 Skaffold 구성만 필요합니다.
Skaffold란 무엇인가요?
Skaffold는 Kubernetes 네이티브 애플리케이션을 지속적으로 개발할 수 있게 해주는 명령줄 도구입니다. Skaffold를 사용해서 Cloud Deploy 지속적 배포 파이프라인에 사용할 로컬 개발 작업공간을 구성할 수 있습니다.
Skaffold에는 다음 기능이 포함되어 있습니다.
CI/CD 파이프라인 활동(빌드, 렌더링, 테스트 배포 등)을 개별적으로 제어할 수 있습니다.
로컬 개발 도구로 유용합니다.
Skaffold 프로필을 사용하면 모두 동일한 구성 파일에서 서로 다른 빌드, 테스트, 배포 구성을 사용해서 여러 환경을 구분할 수 있습니다.
Cloud Deploy에서 Skaffold가 사용되는 이유는 무엇인가요?
Google Cloud Deploy는 Skaffold를 사용해서 렌더링 도구와 전달 파이프라인을 구분합니다. 전달 파이프라인은 단순히 대상에서 대상으로의 진행을 정의하지만, Skaffold 구성은 렌더링되는 매니페스트 및 그 방법을 정의합니다. 이렇게 하면 전달 파이프라인 정의 방법에 영향을 주지 않고도 매니페스트 렌더링을 유연하게 수행할 수 있습니다.
Cloud Deploy에서 Skaffold를 사용할 때의 이점은 다음과 같습니다.
손쉬운 온보딩
로컬 개발 루프로 시작합니다. skaffold.yaml 파일을 팀과 공유해서 일관성을 유지하고 새로운 팀 구성원이 시작할 때 도움을 줄 수 있습니다.
여러 배포 대상 간 렌더링에 대한 일관적인 제어
여러 대상에 대한 다양한 렌더링 및 배포가 포함된 Skaffold 프로필을 사용할 수 있습니다.
전달 파이프라인 정의 방법을 훼손하지 않고 렌더링 도구 선택 가능
Cloud Deploy는 Skaffold를 사용하여 배포 파이프라인 정의를 렌더링 세부정보와 분리할 수 있습니다. 이러한 분리를 통해 전달 파이프라인을 중단하지 않고도 매니페스트를 실험해볼 수 있습니다.
일관성 있는 렌더링 프로세스
렌더링 소스와 컨테이너를 사용해서 렌더링된 매니페스트를 생성합니다.
배포 상태 확인
Skaffold는 배포 상태를 점검하고 Cloud Deploy는 이를 사용합니다.
Cloud Deploy에서 Skaffold는 어떻게 사용되나요?
출시 버전을 만들 때 컨테이너 이미지에 대한 렌더링 소스 및 참조가 Cloud Deploy로 전달됩니다.
출시 버전을 만들 때 Cloud Deploy는 Cloud Build를 호출하고, Cloud Build는 다시 skaffold diagnose 및 skaffold render를 호출해서 해당 렌더링 소스 및 이미지를 사용하여 매니페스트를 렌더링합니다.
배포 시 Cloud Deploy는 skaffold apply를 호출하여 렌더링된 매니페스트 또는 매니페스트를 대상 클러스터에 적용합니다.
커스텀 대상을 사용하지 않는 한 Cloud Deploy는 애플리케이션 배포에 다른 배포자를 사용하는 것을 지원하지 않습니다.
하지만 Helm 또는 Kustomize와 같은 도구를 렌더러로 사용할 수 있습니다. Cloud Deploy가 특정 배포자(예: Helm)를 사용하지 않고 배포하는 방법에 관해 자세히 알아보려면 서비스 아키텍처를 참조하세요.
Skaffold 맞춤설정
파이프라인 요구사항에 맞게 Skaffold를 구성합니다.
전달 파이프라인의 요구사항을 결정합니다.
포함할 대상 수는 몇 개인가요? 렌더링과 배포가 서로 동일한가요? 진행 중 각 대상에 대해 구성이 동일하면 Skaffold 프로필을 사용할 필요가 없습니다. 렌더링할 매니페스트를 기술하는 skaffold.yaml 파일만 필요합니다.
적용 가능한 경우 각 대상에 대해 Skaffold 프로필 만들기
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-03(UTC)"],[[["\u003cp\u003eCloud Deploy utilizes Skaffold for rendering and deploying operations, though it only requires a Skaffold configuration file that specifies the manifests to render and apply.\u003c/p\u003e\n"],["\u003cp\u003eSkaffold is a command-line tool enabling continuous development for Kubernetes applications, offering features like pipeline activity control, local development support, and environment differentiation through profiles.\u003c/p\u003e\n"],["\u003cp\u003eCloud Deploy's use of Skaffold allows for the separation of rendering tools from the delivery pipeline, making manifest rendering more flexible without impacting the delivery pipeline definition.\u003c/p\u003e\n"],["\u003cp\u003eSkaffold profiles allow for diverse rendering and deployment across different targets, and when integrating with Cloud Deploy it allows you to choose different rendering tools without compromising how the delivery pipelines are defined.\u003c/p\u003e\n"],["\u003cp\u003eTo use Skaffold with Cloud Deploy, you must configure a \u003ccode\u003eskaffold.yaml\u003c/code\u003e file based on your pipeline needs, and optionally create target-specific profiles and connect it to your continuous-integration system, but its use in local development is optional.\u003c/p\u003e\n"]]],[],null,["# Use Skaffold with Cloud Deploy\n\nThis article describes [Skaffold](/skaffold), how and why\nCloud Deploy uses it, and what you need to do to make it work for\nyou.\n\nCloud Deploy uses Skaffold for render and deploy operations. You can also\nuse it for local development, build, test, and for [advanced deployment\nfeatures](https://skaffold.dev/docs/pipeline-stages/). However,\nCloud Deploy *requires* only a Skaffold\n[configuration](https://skaffold.dev/docs/references/yaml) that identifies the\nmanifests to render and apply.\n| **Note:** You don't need to install Skaffold. It's included as part of Cloud Deploy.\n\nWhat is Skaffold?\n-----------------\n\nSkaffold is a command-line tool that enables continuous development for\nKubernetes-native applications. You can use Skaffold to configure a local\ndevelopment workspace to use with Cloud Deploy continuous delivery\npipelines.\n\nSkaffold includes the following features:\n\n- It gives you discrete control of CI/CD pipeline activities (build, render,\n test deploy, and so on).\n\n- It's useful as a local development tool.\n\n- Skaffold profiles let you differentiate among different environments, with\n different build, test, and deploy configurations, all in the same configuration\n file.\n\nWhy does Cloud Deploy use Skaffold?\n-----------------------------------\n\nGoogle Cloud Deploy uses Skaffold to separate rendering tools from the delivery\npipeline. Your delivery pipeline simply defines the progression from target to\ntarget, while your Skaffold configuration defines which manifests are rendered\nand how. This makes manifest rendering flexible without affecting how you define\nyour delivery pipeline.\n\nHere are some of the advantages that Skaffold provides when you use it with\nCloud Deploy:\n\n- **Easy onboarding**\n\n Start with a local development loop. You can share your `skaffold.yaml` file\n with your team, which can enable consistency and help new team members get\n started.\n- **Consistent control** over rendering across diverse deployment targets\n\n You can use Skaffold profiles, with different rendering and deployment for\n different targets.\n- **Choice of rendering tools** without compromising how delivery pipelines are\n defined\n\n Using Skaffold allows Cloud Deploy to separate delivery pipeline\n definition from render details. This separation lets you experiment\n with your manifests without disrupting the delivery pipeline.\n- **Coherent rendering process**\n\n The rendering source plus your containers are use to generate rendered\n manifests.\n- **Deployment health checks**\n\n Skaffold performs them, and Cloud Deploy uses them.\n\nHow does Cloud Deploy use Skaffold?\n-----------------------------------\n\n- The rendering source and references to container images are passed to\n Cloud Deploy when you [create a release](/deploy/docs/integrating-ci#calling_from_your_ci_pipeline).\n\n As part of release creation, Cloud Deploy calls\n Cloud Build, which, in turn, invokes [`skaffold diagnose`](https://skaffold.dev/docs/references/cli/#skaffold-diagnose) and\n [`skaffold render`](https://skaffold.dev/docs/workflows/ci-cd/#separation-of-rendering-and-deployment)\n to render the manifest or manifests using that rendering source and those\n images.\n- You can use [Skaffold profiles](https://skaffold.dev/docs/environment/profiles/)\n to differentiate manifests that will be applied to different targets.\n\n- Cloud Deploy [supports *static* Skaffold modules](https://skaffold.dev/docs/design/config/#local-config-dependency).\n\n- When deploying, Cloud Deploy calls\n [`skaffold apply`](https://skaffold.dev/docs/workflows/ci-cd/#example-hydrate-manifests-then-deployapply-to-cluster)\n to apply the rendered manifest or manifests to the target cluster.\n\n- Cloud Deploy doesn't support the use of other deployers to deploy\n your application, unless you use [custom targets](/deploy/docs/custom-targets).\n However, you can use tools like [Helm](https://helm.sh/) or\n [Kustomize](https://kustomize.io/) as renderers. To learn more about how\n Cloud Deploy deploys without using specific deployers (like Helm),\n see [Service architecture](/deploy/docs/architecture#how_they_fit_together_to_deliver_your_release).\n\nMake Skaffold work for you\n--------------------------\n\n1. Configure Skaffold according to your pipeline needs.\n\n 1. Determine the needs of your delivery pipeline.\n\n How many targets will you have? Are rendering and deployment the same for\n each. If configuration is the same for each target in your progression,\n you won't need to use Skaffold profiles. You only need a `skaffold.yaml`\n file that describes the manifests to render.\n 2. If applicable, create a Skaffold profile for each target\n\n Define this in your `skaffold.yaml` file and bind in your delivery pipeline\n definition progression sequence.\n\n See the [Skaffold documentation](https://skaffold.dev/docs/environment/profiles/)\n for more information about Skaffold profiles. Also, the document\n [Managing manifests in Cloud Deploy](/deploy/docs/using-skaffold/managing-manifests)\n includes example profile configurations.\n 3. Set the Skaffold logging verbosity level\n\n By default, the\n [Skaffold logging level](https://skaffold.dev/docs/references/cli/#global-flags)\n is set to `warn`. You can change that to `debug` in the configuration for\n a target's\n [execution environment](/deploy/docs/config-files#executionconfigs)\n by setting `verbose: true`.\n2. Connect Cloud Deploy to your continuous-integration system.\n\n [At the end of your CI](/deploy/docs/integrating-ci) process, pass the\n `skaffold.yaml`, the rendering source, and the container images to be populated\n into the rendered manifest.\n3. **Optional**: set up your local development loop, using Skaffold.\n\n [Using Skaffold for development](https://skaffold.dev/docs/workflows/dev/) is\n optional in Cloud Deploy. The only thing that's required in order\n for Cloud Deploy to operate is a `skaffold.yaml` file that\n identifies manifests to render.\n\nWhat's next\n-----------\n\n- Visit the [Skaffold site](https://skaffold.dev) to find out about how it works\n and what it can do for you.\n\n- [Learn how](/deploy/docs/using-skaffold/select-skaffold) Cloud Deploy\n selects the Skaffold version to use, when the Skaffold version changes, and how\n to determine which version is currently in use.\n\n- [Learn how](/deploy/docs/using-skaffold/managing-manifests) to use Skaffold\n profiles in conjunction with advanced manifest-management tools like Helm,\n Kustomize, and kpt.\n\n- Try out the [Skaffold profiles walkthrough](https://shell.cloud.google.com/?show=ide%2Cterminal&walkthrough_id=deploy--cloud-deploy-profiles-gke)."]]