Sprint 05
Todo
Todo:
✔️ Create the namespace in the GKE cluster ✔️ Create the deployment manifest ✔️ Expose the application via endpoint ✔️ Update the Cloud Build code for deployment ✔️ Validate the deployment
Steps
-
In the Cloud Build menu, select your clsuter and connect to it via Cloudshell. Create the namespace.
kubectl create ns gcp-devops-prod
kubectl get nsFrom the GCP console, go to Workloads > SHOW SYSTEM WORKLOADS > Namespace dropdown bar.

-
Back in your local terminal, create another branch.
git checkout -b "minor/deployment-file"
git branch -
Create the deployment file.
-
Update the cloudbuild.yaml file.
-
Commit the code to Github repo.
git add .
git commit -m "Update the manifest with deployment and service."
gt push -
Switch to the Github UI and then to the branch. Create a PR and then merge it. Once the changes get merged to the master branch, it will trigger the Cloud Build.
-
Refresh the Github page then click on the left commit message. We should see the notification that the Cloud Build has been triggered. Click Details > View more details on Google CLoud Build. It should open a new tab.
Once successful, we should see all green check marks.
-
From the GKE console, go to Workloads > Namespace: gcp-devops-prod > Click the deployment name.
Go to Services & Ingress. We should see the endpoint here. This is an external loadbalancer provisioned by GCP.
Click the public IP address to open the application in a new tab.
Connect to the GKE cluster using Cloudshell and check the pods.
kubectl get po