Text of docs.cloud.google.com › kubernetes-engine › docs › tutorials › modern-cicd-gke-develo… as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

Modern CI/CD with GKE: Apply the developer workflow | Google Kubernetes Engine (GKE) | Google Cloud Documentation

Skip to main content Console English Deutsch Español Español – América Latina Français Indonesia Italiano Português Português – Brasil עברית 中文 – 简体 中文 – 繁體 日本語 한국어 Sign in Google Kubernetes Engine (GKE) Start free Home Google Kubernetes Engine (GKE) Guides Modern CI/CD with GKE: Apply the developer workflow Stay organized with collections Save and categorize content based on your preferences.

Last reviewed 2023-09-11 UTC Standard This tutorial shows how to onboard a new application, develop a feature for the application, and deploy the application to production using modern continuous integration/continuous delivery (CI/CD) techniques with Google Kubernetes Engine (GKE). This document is part of a series: Modern CI/CD with GKE: A software delivery framework Modern CI/CD with GKE: Build a CI/CD system (reference architecture) Modern CI/CD with GKE: Apply the developer workflow (this document) In this tutorial, you use tools such as Skaffold , kustomize , Artifact Registry , Config Sync , Cloud Build and Cloud Deploy to develop, build and deploy your application.

This document is intended for enterprise architects and application developers, as well as IT security, DevOps, and Site Reliability Engineering (SRE) teams. Some experience with automated deployment tools and processes is useful for understanding the concepts in this document. Architecture In this tutorial, you onboard a new application. Then, you develop a new feature and deploy the application in dev, staging, and production environments.

The reference architecture contains the infrastructure and tools needed to onboard and release a new application with the workflow shown in the following diagram: Starting at the code repository for CI, the workflow includes the following steps: You share your application source code through your application repositories. When you commit and push the code to the application repository, it automatically triggers a CI pipeline in Cloud Build.

The CI process creates and pushes a container image to Artifact Registry. The CI process also creates a CD release for the application in Cloud Deploy. The CD release generates fully rendered kubernetes manifests for dev using skaffold and deploys them in the dev GKE cluster. The CD release is then promoted from dev to a staging target, that generates fully rendered staging manifests and deploys them in the staging GKE cluster.

Then, The CD release is promoted from staging to production, that generates fully rendered production manifests and deploys them in production GKE clusters. For more information about the tools and infrastructure used in this workflow, see Modern CI/CD with GKE: Build a CI/CD system . Objectives Onboard a new application. Deploy the application in the dev environment. Develop a new feature and deploy it in the dev environment.

Promote the new feature to staging and then release it into production. Test the resiliency of the application. Costs In this document, you use the following billable components of Google Cloud: Google Kubernetes Engine Artifact Registry Cloud Build Cloud Deploy To generate a cost estimate based on your projected usage, use the pricing calculator . New Google Cloud users might be eligible for a free trial . When you finish the tasks that are described in this document, you can avoid continued billing by deleting the resources that you created.

For more information, see Clean up . Before you begin For this tutorial, deploy the reference architecture in this series. Prepare your environment If you're continuing directly from Modern CI/CD with GKE: Build a CI/CD system , go to the next section. However, if you have a new session, or your session expired, open Cloud Shell and set the project where you installed the reference architecture infrastructure: gcloud config set core/project PROJECT_ID Replace PROJECT_ID with your Google Cloud project ID.

Onboard a new application The reference architecture contains an application factory. This factory is a collection of a git repository named application-factory-repo and the following Cloud Build triggers: create-app tf-plan tf-apply create-team You use the application factory to onboard a new application from starter repositories. Application onboarding consists of the following steps: Create the application definition : You create the application definition in a Terraform file and store it in application-factory-repo which acts as application catalog.

Create the application infrastructure : You run Terraform on the application definition file to create the application infrastructure. Application infrastructure consists of the following: A Landing zone for the new application includes defining the namespace, service account, and base policies in the acm-gke-infrastructure-repo repository. The landing zone is only created in a dev GKE cluster while onboarding a new application.

This is done to unblock the developers so that they can use the dev environment and start iterating on it. The landing zone in the staging and production clusters are created with the GitOps approach. This approach is demonstrated later in this document when you are ready to promote the release in those clusters. The Infrastructure repository from infrastructure starter repository that hosts the code to create the CI pipeline in Cloud Build, the CD pipeline in Cloud Deploy, and the Artifact Registry repository for storing artifacts.

An infrastructure Cloud Build trigger that takes the code in the infrastructure repository and creates the resources based on their definition. An application repository from the application starter repository that hosts the application's source code. Create application's CI/CD resources : You use the application infrastructure to create CI/CD resources for the application. Create application definition: Run the create-app trigger to generate an application definition file in application-factory-repo .

The definition file contains the declarative definition of the resources required to create an application. In the Google Cloud console, go to the Cloud Build page: Go to the Cloud Build page Click create-app trigger . Click SHOW URL PREVIEW to display the URL required to invoke the webhook. In Cloud Shell, invoke the trigger by making a curl request on the URL obtained from the previous step and passing the parameters as a payload to it. curl " WEBHOOK_URL " -d '{"message": {"app": "sample","runtime": "python","trigger_type": "webhook","github_team": ""}}' In the previous code sample: Replace WEBHOOK_URL with the URL obtained from the trigger.

"app": "sample" specifies the name of the application. "runtime": "python" tells the application factory to use the python template to create application repositories. "trigger_type": "webhook" specifies the type of CI/CD pipelines for the application. "github_team": "" is a team in GitHub that's going to be associated with the repositories that are created for the application. Since, you haven't created a GitHub team yet, pass it as an empty string.

Check the pipeline for create-app trigger: Go to the Cloud Build History page . There is a new pipeline for create-app trigger. When that has completed, the application definition is created in application-factory-repo . Review the application definition file: In a web browser, go to GitHub and sign in to your account. Click the picture icon and click Your organizations . Choose your organization. Click the repository application-factory-repo , go to the folder apps/python and open the new file named sample.tf created by the create-app trigger.

Inspect the file, this file contains Terraform code to create a new application. Create application infrastructure: Now that you've created the application definition, you run the trigger tf-apply to create the application infrastructure. In Google Cloud console: Go to the Cloud Build page . Click tf-apply trigger. Click "SHOW URL PREVIEW" to display the URL

The rest of this page is on the live site.