GoogleCloudPlatform / gke-gitops-tutorial-cloudbuild

GitOps-style Continuous Delivery For Kubernetes Engine With Cloud Build
https://cloud.google.com/kubernetes-engine/docs/tutorials/gitops-cloud-build
Apache License 2.0
119 stars 106 forks source link

GKE Get Credentials command fails in Task 5 of the Coursera Lab #11

Closed trwicks closed 2 years ago

trwicks commented 2 years ago

The Delivery stage fails due the Deploy step not specifying the correction location (zone? - see output.)

The commands that start the build step are:

cd ~/hello-cloudbuild-app
git add cloudbuild.yaml
git commit -m "Trigger CD pipeline"
git push google master
starting build "6513f637-68a8-4a6b-a006-1628a00a6908"

FETCHSOURCE
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint:   git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint:   git branch -m <name>
Initialized empty Git repository in /workspace/.git/
From https://source.developers.google.com/p/qwiklabs-gcp-04-2efdfdb1f53b/r/hello-cloudbuild-env
 * branch            171e8c6b63643a11b35af1b0a93b3b3b4ea38b71 -> FETCH_HEAD
HEAD is now at 171e8c6 Deploying image gcr.io/qwiklabs-gcp-04-2efdfdb1f53b/hello-cloudbuild:a6a7a92 Built from commit a6a7a927897e8d7ee4c4df6f0339be0b9e96def4 of repository hello-cloudbuild-app Author: root <1050906284593@cloudbuild.gserviceaccount.com>
BUILD
Starting Step #0 - "Deploy"
Step #0 - "Deploy": Already have image (with digest): gcr.io/cloud-builders/kubectl
Step #0 - "Deploy": Running: gcloud container clusters get-credentials --project="qwiklabs-gcp-04-2efdfdb1f53b" --region="us-central1" "hello-cloudbuild"
Step #0 - "Deploy": Fetching cluster endpoint and auth data.
Step #0 - "Deploy": ERROR: (gcloud.container.clusters.get-credentials) ResponseError: code=404, message=Not found: projects/qwiklabs-gcp-04-2efdfdb1f53b/locations/us-central1/clusters/hello-cloudbuild.
Step #0 - "Deploy": Could not find [hello-cloudbuild] in [us-central1].
Step #0 - "Deploy": Did you mean [hello-cloudbuild] in [us-central1-b]?
Finished Step #0 - "Deploy"
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/kubectl" failed: step exited with non-zero status: 1

Let me know if you need any more info.

MrTrustor commented 2 years ago

You're the second person to open an issue on this (see #10). The repo has been fixed in #9 but the lab you're referring to is pointing to an old version. Can you give me the link and name of the lab in question? I need to track down the owner so that they update it.

trwicks commented 2 years ago

Lab name is "CI/CD for Google Kubernetes Engine using Cloud Build" - link https://googlecoursera.qwiklabs.com/focuses/18861745

jsingh04 commented 2 years ago

Issue at task 5 Still on as on 22 Nov for LAB "CI/CD for Google Kubernetes Engine using Cloud Build".

IN the GIT env:

Error from build : ERROR: build step 0 "gcr.io/cloud-builders/kubectl" failed: step exited with non-zero status: 1 ERROR Finished Step #0 - "Deploy" Step #0 - "Deploy": Did you mean [hello-cloudbuild] in [us-central1-b]?

MrTrustor commented 2 years ago

Thanks for the details! I think I found the right team internally, it'll probably take a bit of time to update the lab.

MrTrustor commented 2 years ago

The team tells me that the lab is now updated to match this repo.