Arcade Trail: Containers & Load Balancing | GSP100

Solution for Arcade Trail: Containers & Load Balancing | GSP100. 1 lab: GSP100. Fast copy-paste commands for Google Cloud.

GSP100 — Google Kubernetes Engine: Qwik Start

Estimated time: 25 minutes

# 🚀 Kubernetes Engine: Qwik Start | GSP100 > ⚠️ **Disclaimer:** This is an independent, community-made walkthrough created for educational purposes, hands-on practice, and Google Cloud certification preparation. This guide helps learners understand Google Kubernetes Engine (GKE), deploy containerized applications, and manage cloud infrastructure. Always attempt the lab yourself first and follow Google Cloud Skills Boost / Qwiklabs Terms of Service. This walkthrough is not affiliated with or en

clear
CYAN=


\033[0;36m'
GREEN=


\033[0;32m'
YELLOW=


\033[0;33m'
BOLD=


\033[1m'
RESET=


\033[0m'

echo "${CYAN}${BOLD}"
echo "   ____        _   _ _            __   ___              "
echo "  / __ \      | | (_) |          / _| / _ \             "
echo " | |  | |_ __| |__  _| |_  ___   | |_ | | | |_ __ ___  "
echo " | |  | | '__| '_ \| | __| / _ \ |  _|| | | | '_ \ / __| "
echo " | |__| | |  | |_) | | |_ | (_) || |  | |_| | |_) \__ \ "
echo "  \____/|_|  |_.__/|_|\__| \___/ |_|   \___/| .__/|___/ "
echo "                                            | |         "
echo "                                            |_|         "
echo "${RESET}"

echo "${YELLOW}▶ Detecting compute zone...${RESET}"
export ZONE=$(gcloud compute project-info describe --format="value(commonInstanceMetadata.items[google-compute-default-zone])")
gcloud config set compute/zone $ZONE --quiet

echo "${YELLOW}▶ Creating GKE cluster (this will take 3-5 minutes)...${RESET}"
gcloud container clusters create --machine-type=e2-medium --zone=$ZONE lab-cluster --quiet

echo "${YELLOW}▶ Getting cluster credentials...${RESET}"
gcloud container clusters get-credentials lab-cluster --zone=$ZONE --quiet

echo "${YELLOW}▶ Deploying hello-server application...${RESET}"
kubectl create deployment hello-server --image=gcr.io/google-samples/hello-app:1.0

echo "${YELLOW}▶ Exposing the application to the internet...${RESET}"
kubectl expose deployment hello-server --type=LoadBalancer --port 8080

echo "${GREEN}${BOLD}✓ Deployment initialized!${RESET}"
echo "${YELLOW}Wait roughly 60 seconds for the external IP to provision, then check your progress for Tasks 2, 3, and 4.${RESET}"
CYAN=


\033[0;36m'
GREEN=


\033[0;32m'
YELLOW=


\033[0;33m'
BOLD=


\033[1m'
RESET=


\033[0m'

echo "${YELLOW}▶ Deleting GKE cluster (this will take a few minutes)...${RESET}"
gcloud container clusters delete lab-cluster --zone=$ZONE --quiet

echo "${GREEN}${BOLD}✓ Cluster deleted. Lab completed successfully!${RESET}"