Last active
October 14, 2019 08:38
-
-
Save vanduc1102/6088227c26b90062e5959973d12d8222 to your computer and use it in GitHub Desktop.
Scale Out and Update a Containerized Application on a Kubernetes Cluster https://www.qwiklabs.com/focuses/1739?parent=catalog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#step 0 | |
gcloud config set project your_project_id_here | |
gsutil cp -r gs://$DEVSHELL_PROJECT_ID/ . | |
tar -xf source_code_file | |
#step1 | |
docker build . -t echo-app | |
docker tag echo-app gcr.io/$DEVSHELL_PROJECT_ID:latest | |
docker push gcr.io/$DEVSHELL_PROJECT_ID:latest | |
#step2 | |
gcloud container clusters get-credentials echo-cluster | |
kubectl edit deployment echo-web | |
# update the url of image | |
kubectl scale deployment echo-web --replicas=2 | |
# DONE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment