This article explains how to deploy and validate an application on GKE using Cloud Build and GitHub.
After configuring our cloudbuild.yaml to build, push, and deploy the Docker image to a GKE cluster via gke.yaml, we can automate the entire CI/CD workflow with a Cloud Build trigger. Once this file is committed to GitHub, the pipeline performs the following steps:
Then, navigate to GitHub, select your feature branch, and click Contribute → Open pull request. After reviewing the diff, click Create pull request and then Merge.
The deployment step failed because the specified GKE cluster name does not exist. Always verify that --cluster matches your actual cluster in the correct zone or region.
Inspecting the logs reveals an IAM binding that references a non-existent cluster: