Scale Out and Update a Containerized Application on a Kubernetes Cluster

gsutil cp -r gs://qwiklabs-gcp-00-ef69ef2ca781/echo-web-v2.tar.gz .
tar -xzf echo-web-v2.tar.gz
docker build -t echo-app:v2 .
docker tag echo-app:v2 gcr.io/$DEVSHELL_PROJECT_ID/echo-app:v2
docker push gcr.io/$DEVSHELL_PROJECT_ID/echo-app:v2
gcloud container clusters get-credentials echo-cluster --zone=us-central1-a
kubectl create deployment echo-web --image=gcr.io/qwiklabs-resources/echo-app:v2
kubectl scale deployment echo-web --replicas=2
kubectl expose deployment echo-web --type=LoadBalancer --port 80 --target-port 8000

Last updated