GSP-305: Scale Out and Update a Containerized Application on a Kubernetes Cluster
Overview
Enter the following commands:
1gsutil cp gs://sureskills-ql/challenge-labs/ch05-k8s-scale-and-update/echo-web-v2.tar.gz .
2
3tar xvzf echo-web-v2.tar.gz
4
5gcloud builds submit --tag gcr.io/$DEVSHELL_PROJECT_ID/echo-app:v2 .
6
7gcloud container clusters get-credentials echo-cluster --zone us-central1-a
8
9kubectl create deployment echo-web --image=gcr.io/qwiklabs-resources/echo-app:v1
10
11kubectl expose deployment echo-web --type=LoadBalancer --port 80 --target-port 8000
12
13kubectl edit deploy echo-web
- Change image version 'v1' to 'v2' by pressing "i" Save by esc -> Esc - > ":wq" and press enter.
1kubectl scale deploy echo-web --replicas=2
Congratulations, you're all done with the lab 😄