Skip to content

Instantly share code, notes, and snippets.

@vanduc1102
Last active October 14, 2019 08:38
Show Gist options
  • Save vanduc1102/6088227c26b90062e5959973d12d8222 to your computer and use it in GitHub Desktop.
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
#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