Skip to content
Leonardo Espinosa Torres edited this page Apr 22, 2018 · 1 revision

Testing Deploy

Execute following steps to prepare comeygana home project:

References: https://cloud.google.com/container-engine/docs/tutorials/hello-app

Create Docker Container and push in GCloud

  • Build docker image
docker build -t homecyg .
  • list docker images
docker images
  • Test docker image
docker run -p 8080:8080 homecyg
  • Create Tag to docker image (Specific version)
docker tag homecyg gcr.io/comeygana-201900/homecyg:<v0.0.0>
docker tag homecyg gcr.io/comeygana-201900/homecyg:v1.0.0
  • Push docker image in GCloud. Execute gcloud init first and docker login!
gcloud docker -- push gcr.io/comeygana-201900/homecyg:<v0.0.0>
gcloud docker -- push gcr.io/comeygana-201900/homecyg:v1.0.0
  • Set Zone in GCloud
gcloud config set compute/zone us-east1-d
  • List container clusters
gcloud container clusters list
  • List docker image tags in GCloud
gcloud container images list-tags gcr.io/comeygana-201900/homecyg
  • Get cluster credentials
gcloud container clusters get-credentials cl-cyg-home
  • Update Deployment
kubectl set image deployment/homecyg-node homecyg-node=gcr.io/comeygana-201900/homecyg:<v0.0.0>

Clone this wiki locally