Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save trungng1992/b6aec71544b0823dda2c8a87c6e8c916 to your computer and use it in GitHub Desktop.
Save trungng1992/b6aec71544b0823dda2c8a87c6e8c916 to your computer and use it in GitHub Desktop.
Scale Out and Update a Containerized Application on a Kubernetes Cluster
##### Download source code web-v2
$ gsutil cp gs://$DEVSHELL_PROJECT_ID/echo-web-v2.tar.gz .
$ tar -zxvf echo-web-v2.tar.gz
$ gcloud builds submit --tag gcr.io/$DEVSHELL_PROJECT_ID/echo-app:v2 .
##### Update deploy to new version
$ kubectl set image deployment/echo-web echo-app=gcr.io/$DEVSHELL_PROJECT_ID/echo-app:v2
##### Scale deployment run two pods
$ kubectl scale deployment/echo-web --replicas=2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment