Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
En este artículo, se describe Skaffold, cómo y por qué
lo usa Cloud Deploy, y lo que debes hacer para que funcione para
ti.
Cloud Deploy usa Skaffold para las operaciones de renderización e implementación. También puedes
usarlo para el desarrollo local, la compilación, las pruebas y las funciones de implementación
avanzada. Sin embargo,
Cloud Deploy requiere solo una configuración de Skaffold que identifique los
manifiestos que se renderizarán y aplicarán.
¿Qué es Skaffold?
Skaffold es una herramienta de línea de comandos que permite el desarrollo continuo para aplicaciones nativas de Kubernetes. Puedes usar Skaffold para configurar un lugar de trabajo de desarrollo local para usarlo con las canalizaciones de entrega continua de Cloud Deploy.
Skaffold incluye las siguientes funciones:
Te brinda un control discreto de las actividades de canalización de CI/CD (compilación, renderización, implementación de pruebas, etcétera).
Es útil como herramienta de desarrollo local.
Los perfiles de Skaffold te permiten diferenciar entre diferentes entornos con diferentes opciones de configuración de compilación, prueba y, también, implementación, todas en el mismo archivo de configuración.
¿Por qué Cloud Deploy usa Skaffold?
Google Cloud Deploy usa Skaffold para separar las herramientas de renderización de la canalización de entrega. La canalización de entrega solo define la progresión de destino a destino, mientras que la configuración de Skaffold define qué manifiestos se renderizan y cómo. Esto hace que la renderización de manifiestos sea flexible sin afectar la forma en que defines tu canalización de entrega.
Estas son algunas de las ventajas que proporciona Skaffold cuando se usa con Cloud Deploy:
Integración sencilla
Comienza con un bucle de desarrollo local. Puedes compartir tu archivo skaffold.yaml con tu equipo, lo que puede permitir la coherencia y ayudar a los miembros nuevos a comenzar.
Control coherente sobre la renderización en diversos destinos de implementación
Puedes usar perfiles de Skaffold, con implementación y renderización diferentes para distintos destinos.
Elección de herramientas de renderización sin comprometer cómo se definen las canalizaciones de entrega
El uso de Skaffold permite que Cloud Deploy separe la definición de la canalización de entrega de los detalles de renderización. Esta separación te permite experimentar con tus manifiestos sin interrumpir la canalización de entrega.
Proceso de renderización coherente
La fuente de renderización y tus contenedores se usan para generar manifiestos renderizados.
Verificaciones de estado de la implementación
Skaffold las realiza y Cloud Deploy las usa.
¿Cómo usa Cloud Deploy Skaffold?
La fuente de renderización y las referencias a las imágenes del contenedor se pasan a Cloud Deploy cuando creas una versión.
Como parte de la creación de la versión, Cloud Deploy llama a Cloud Build, que, a su vez, invoca a skaffold diagnose y skaffold render para renderizar el manifiesto o los manifiestos mediante esa fuente de renderización y esas imágenes.
Puedes usar perfiles de Skaffold para diferenciar los manifiestos que se aplicarán a diferentes destinos.
Cuando realizas una implementación, Cloud Deploy llama a skaffold apply para aplicar el manifiesto o manifiestos renderizados al clúster de destino.
Cloud Deploy no admite el uso de otros implementadores para implementar tu aplicación, a menos que uses destinos personalizados.
Sin embargo, puedes usar herramientas como Helm o Kustomize como renderizadores. Para obtener más información sobre cómo se implementa Cloud Deploy sin usar implementadores específicos (como Helm), consulta Arquitectura del servicio.
Haz que Skaffold funcione para ti
Configura Skaffold según las necesidades de tu canalización.
Determina las necesidades de tu canalización de entrega.
¿Cuántos objetivos tendrás? La renderización y la implementación son las mismas para cada una. Si la configuración es la misma para cada destino en tu progresión,
no necesitarás usar perfiles de Skaffold. Solo necesitas un archivo skaffold.yaml que describa los manifiestos que se renderizarán.
Si corresponde, crea un perfil de Skaffold para cada destino.
Define esto en tu archivo skaffold.yaml y vincúlalo en la secuencia de progresión de definición de la canalización de entrega.
Conecta Cloud Deploy a tu sistema de integración continua.
Al final de tu proceso de CI, pasa el skaffold.yaml, la fuente de renderización y las imágenes de contenedor que se propagarán al manifiesto renderizado.
Opcional: Configura tu bucle de desarrollo local mediante Skaffold.
El uso de Skaffold para el desarrollo es opcional en Cloud Deploy. Lo único que se requiere para que Cloud Deploy funcione es un archivo skaffold.yaml que identifica los manifiestos que se renderizarán.
¿Qué sigue?
Visita el sitio de Skaffold para obtener información sobre cómo funciona y qué puede hacer por ti.
Descubre cómo Cloud Deploy selecciona la versión de Skaffold que se usará, cuándo cambia la versión de Skaffold y cómo determinar qué versión está en uso.
Obtén información para usar perfiles de Skaffold junto con herramientas avanzadas de administración de manifiestos, como Helm, Kustomize y kpt.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 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)."]]