File tree Expand file tree Collapse file tree
Containers/Kubernetes-examples/GCP Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,19 +30,29 @@ gcloud config set project ${PROJECT_ID}
30303) Build and Push Application Docker container to Google Container Registry (GCR)
3131cd greetings
3232docker build -t gcr.io/${PROJECT_ID}/greetings:v1 .
33+
34+ Enable Google Container Registry API in Cloud Console at
35+ https://console.cloud.google.com/apis/api/containerregistry.googleapis.com/overview?project=${PROJECT_ID}
36+
37+ Then push the container to GCR
38+
3339gcloud docker -- push gcr.io/${PROJECT_ID}/greetings:v1
3440
3541
36- 4) Create a GKE cluster
42+ 4) Enable Kubernetes Engine API in Cloud Console at
43+ https://console.cloud.google.com/apis/api/container.googleapis.com/overview?project=4{PROJECT_ID}
44+
45+ 5) Create a GKE cluster
3746gcloud container clusters create --machine-type=g1-small --num-nodes=1 testcluster1
3847
3948
40- 5 ) Create a Google Cloud SQL instance
49+ 6 ) Create a Google Cloud SQL instance
4150gcloud sql instances create instance1 --tier=db-f1-micro --authorized-networks=0.0.0.0/0
4251
4352
44- 6) Create testdb database on the Cloud SQL instance
45- gcloud sql users set-password root % --instance instance1 --password 'testpass123!@#'
53+ 7) Create testdb database on the Cloud SQL instance
54+ gcloud sql users set-password root --instance=instance1 --host=35.184.210.53 --password='testpass123!@#'
55+ (If for some reason above command fails, you can set the password from Google CloudSQL console).
4656sudo apt-get install mysql-client
4757gcloud sql instances list
4858mysql -h <IP-address-of-SQL-Instance> --user=root --password='testpass123!@#'
You can’t perform that action at this time.
0 commit comments