Organízate con las colecciones
Guarda y clasifica el contenido según tus preferencias.
En este artículo se describe Skaffold, cómo y por qué lo usa Cloud Deploy, y qué debe hacer para que funcione.
Cloud Deploy usa Skaffold para las operaciones de renderizado y despliegue. También puedes usarlo para desarrollar, compilar y probar aplicaciones de forma local, así como para acceder a funciones de implementación avanzadas. Sin embargo, Cloud Deploy solo requiere una configuración de Skaffold que identifique los manifiestos que se van a renderizar y aplicar.
¿Qué es Skaffold?
Skaffold es una herramienta de línea de comandos que permite el desarrollo continuo de aplicaciones nativas de Kubernetes. Puedes usar Skaffold para configurar un espacio de trabajo de desarrollo local que se use con los flujos de procesamiento de entrega continua de Cloud Deploy.
Skaffold incluye las siguientes funciones:
Te permite controlar de forma independiente las actividades del flujo de procesamiento de CI/CD (compilación, renderización, prueba de despliegue, etc.).
Es útil como herramienta de desarrollo local.
Los perfiles de Skaffold te permiten diferenciar entre distintos entornos con diferentes configuraciones de compilación, prueba y despliegue, todo en el mismo archivo de configuración.
¿Por qué usa Cloud Deploy Skaffold?
Google Cloud Deploy usa Skaffold para separar las herramientas de renderizado de la canalización de entrega. Tu flujo de procesamiento de entrega solo define la progresión de un destino a otro, mientras que tu configuración de Skaffold define qué manifiestos se renderizan y cómo. De esta forma, el renderizado de manifiestos es flexible sin que afecte a la forma en que defines tu canal de distribución.
Estas son algunas de las ventajas que ofrece Skaffold cuando lo usas con Cloud Deploy:
Incorporación sencilla
Empieza con un bucle de desarrollo local. Puedes compartir tu archivo skaffold.yaml con tu equipo, lo que puede fomentar la coherencia y ayudar a los nuevos miembros a empezar.
Control coherente sobre la renderización en diferentes objetivos de implementación
Puedes usar perfiles de Skaffold con diferentes renderizaciones e implementaciones para distintos destinos.
Elección de herramientas de renderización sin comprometer la forma en que se definen las cadenas de suministro
Skaffold permite a Cloud Deploy separar la definición del flujo de procesamiento de entrega de los detalles de renderizado. Esta separación te permite experimentar con tus manifiestos sin interrumpir la canalización de entrega.
Proceso de renderizado coherente
La fuente de renderización y tus contenedores se usan para generar manifiestos renderizados.
Comprobaciones del estado de los despliegues
Skaffold las lleva a cabo y Cloud Deploy las usa.
¿Cómo usa Cloud Deploy Skaffold?
La fuente de renderización y las referencias a las imágenes de contenedor se transfieren a Cloud Deploy cuando crea una versión.
Como parte de la creación de la versión, Cloud Deploy llama a Cloud Build, que, a su vez, invoca skaffold diagnose y skaffold render
para renderizar el archivo o los archivos de manifiesto con ese origen de renderizado y esas imágenes.
Puedes usar perfiles de Skaffold
para diferenciar los manifiestos que se aplicarán a diferentes destinos.
Durante la implementación, Cloud Deploy llama a
skaffold apply
para aplicar el manifiesto o los manifiestos renderizados al clúster de destino.
Cloud Deploy no admite el uso de otros implementadores para desplegar tu aplicación, a menos que utilices destinos personalizados.
Sin embargo, puedes usar herramientas como Helm o Kustomize como renderizadores. Para obtener más información sobre cómo implementa Cloud Deploy sin usar implementadores específicos (como Helm), consulta el artículo sobre la arquitectura de servicios.
Haz que Skaffold trabaje para ti
Configura Skaffold según las necesidades de tu canalización.
Determina las necesidades de tu flujo de procesamiento de entrega.
¿Cuántos objetivos tendrás? ¿El renderizado y la implementación son iguales para cada uno? Si la configuración es la misma para cada destino de tu progresión, no tendrás que usar perfiles de Skaffold. Solo necesitas un skaffold.yaml
archivo que describa los manifiestos que se van a renderizar.
Si procede, crea un perfil de Skaffold para cada destino
Defínelo en el archivo skaffold.yaml y vincúlalo en la secuencia de progresión de la definición del flujo de procesamiento de entrega.
Opcional: configura tu bucle de desarrollo local con Skaffold.
Usar Skaffold para el desarrollo es opcional en Cloud Deploy. Lo único que se necesita para que Cloud Deploy funcione es un archivo skaffold.yaml que identifique los manifiestos que se van a renderizar.
Siguientes pasos
Visita el sitio de Skaffold para descubrir cómo funciona y qué puede hacer por ti.
Consulta cómo selecciona Cloud Deploy la versión de Skaffold que se va a usar, cuándo cambia la versión de Skaffold y cómo determinar qué versión se está usando.
Consulta cómo usar perfiles de Skaffold junto con herramientas avanzadas de gestión de archivos de manifiesto, como Helm, Kustomize y kpt.
[[["Es fácil de entender","easyToUnderstand","thumb-up"],["Me ofreció una solución al problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Es difícil de entender","hardToUnderstand","thumb-down"],["La información o el código de muestra no son correctos","incorrectInformationOrSampleCode","thumb-down"],["Me faltan las muestras o la información que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-08-21 (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)."]]