[[["易于理解","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-03。"],[[["\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)."]]