ä½ã®è©±ãã¨ããã¨
Dockerã³ã³ããã§ã¢ããªãä½ãã¨ä¾¿å©ã§ãããä½ã§ãããã§ãã³ã³ããã«çªã£è¾¼ãã¨ï¼ãã¨ãã°ãRDBã¨ãï¼é¢åãªäºãå¤ããªãã¾ãã
ã»ã¹ã±ã¼ã©ããªãã£ãå¿
è¦
ã»æ©è½åä½ã®ãªãã¡ã¯ã¿ãªã³ã°ï¼ã¢ãããã¼ãï¼ãã¤ã¯ããµã¼ãã¹åï¼ãå¿
è¦
ã¨ããé¨åã«ãã©ã¼ã«ã¹ãã¦ã³ã³ããåãã¦ããã®ä»ã®ãã¼ãã¯ãã³ã³ãã以å¤ã®ç°å¢ã¨çµã¿åãããæ¹ã幸ãã«ãªããããç¥ãã¾ããã
ã¨ããããã§ãGCPãå©ç¨ãã¦ããããªæãã®ã¢ããªã±ã¼ã·ã§ã³ç°å¢ãæ§ç¯ãããã¢ã®æé ãç´¹ä»ãã¾ãã
ã»äºç®ä¸¦ã¹ã²ã¼ã ã®APIãµã¼ãã¼ãä½ãã¾ãã
ã»ã²ã¼ã ã®é²è¡ã管çããããã³ãã¨ã³ãã¨ãã³ã³ãã¥ã¼ã¿ã¼ãã¬ã¤ã¤ã¼ã®æèã«ã¼ãã³ï¼AIï¼ãæä¾ããããã¯ã¨ã³ããGoogle Container Engine (GKE) ä¸ã®ã³ã³ããã§ãããã¤ãã¾ãã
ã»ã²ã¼ã ã®ã¹ãã¼ã¿ã¹ã¯ãCloud Datastoreï¼NoSQLï¼ã«ä¿åãã¾ãã
ãã¢ã®ã·ããªãªã¯ãããªæãã
ã»ã¯ããã¯ï¼ã²ã¼ã ã®ãªãªã¼ã¹ã¹ã±ã¸ã¥ã¼ã«ã«AIã®éçºãéã«åããªãã£ãããï¼ï¼ã©ã³ãã ãªæãæã¤ããã¼ã®AIã§ã²ã¼ã ããªãªã¼ã¹ãã¾ãã
ã»ãã®å¾ãã¡ããã¨ããAIã®éçºãçµãã£ã¦ãããã¯ã¨ã³ãã®AIã³ã³ããããã£ããã¢ãããã¼ããã¾ãã
ã»Kubernetesã®Rolling Updateæ©è½ã使ãã®ã§ãã²ã¼ã ã®ãã¬ã¤ã¤ã¼ã¯ãã²ã¼ã ã®éä¸ã§ãçªç¶ãã³ã³ãã¥ã¼ã¿ã¼ã®æã¤æãè¯ããªããã¨ã«æ°ã¥ãã¾ãã
ã¡ãªã¿ã«ãããã¯ã¨ã³ãã®AIã®ãµã³ãã«ã³ã¼ãã¯ããªãã¡ãã£ã¦ãã§ããTensorFlowãåãã¦ããããã§ã¯ããã¾ãããã¾ãã以ä¸ã®ä½æ¥ã®åæã¨ãã¦ãGCPã®ããã¸ã§ã¯ãä½æã課éè¨å®ãCompute Engine, Datastore, Container Engine APIã®æå¹åãå¿ è¦ã§ãã
ã³ã³ããã¤ã¡ã¼ã¸ã®ä½æã¨åä½ç¢ºèª
GCPã§ã¯ãCloud Shellã¨å¼ã°ããä½æ¥ç¨ã¤ã³ã¹ã¿ã³ã¹ãç¡æã§å©ç¨ã§ãã¾ããCloud Shellä¸ã§ã¯ãDockerãåãã¦ããã®ã§ãDockerfileããã¤ã¡ã¼ã¸ãä½æãããã¨ãã§ãã¾ãã
åèï¼Google Cloud Platform Japan Blog - Cloud Shell が GA リリース、料金は無料に
Cloud Consoleã§ä¸è¨ã®ãã¿ã³ããããã¨ããã¨ãCloud Shellãèµ·åãã¾ããCloud Shellã®ã¤ã³ã¹ã¿ã³ã¹ã¯ãæ°æéã¢ã¯ã»ã¹ãã¦ããªãã¨èªåçã«åé¤ããã¾ããããã¼ã ãã£ã¬ã¯ãªã¼ã®å 容ã¯ä¿åãããããã«ãªã£ã¦ãã¾ãã
次ã®æé ã§ã½ã¼ã¹ããã¦ã³ãã¼ããã¦ãã³ã³ããã¤ã¡ã¼ã¸ãï¼ã¤ä½æãã¾ãã
$ git clone https://github.com/GoogleCloudPlatform/gke-gobang-app-example.git $ cd gke-gobang-app-example/ $ docker build -t frontend:v1.0 frontend/ $ docker build -t backend:v1.0 backend-dummy/ $ docker build -t backend:v1.1 backend-smart/ $ docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE backend v1.1 c1c5f9555252 3 seconds ago 286.2 MB backend v1.0 6c30c63cd6dc 34 seconds ago 286.1 MB frontend v1.0 0982f697e8dc 38 seconds ago 286.2 MB debian 8.4 7a4c9a4d5e7a 11 weeks ago 125.1 MB
ã»frontend:v1.0 â ããã³ãã¨ã³ã
ã»backend:v1.0 â ããã¼AIã®ããã¯ã¨ã³ã
ã»backend:v1.1 â ã¡ããã¨ããAIã®ããã¯ã¨ã³ã
â» Cloud Shellä¸ã§ãã®ã¤ã¡ã¼ã¸ããã«ãããã¨ãçµæ§æéããããã¾ããæ°é·ã«ãå¾ ã¡ä¸ããã
ä½æããã¤ã¡ã¼ã¸ãã¾ãã¯ãCloud Shellã®ãã¼ã«ã«ã¤ã³ã¹ã¿ã³ã¹ä¸ã®Dockerã§èµ·åãã¦ãåä½ç¢ºèªãè¡ãã¾ããã¯ããã®gcloudã³ãã³ãã¯ãããã¯ã¨ã³ãã®Cloud Datastoreãæºåããããã®ã³ãã³ãã§ãã次ã®ã³ãã³ãã® "hogehoge" ã«ã¯ãGCPã®ããã¸ã§ã¯ãIDãæå®ãã¦ãã ããã
$ gcloud app create --region=us-central $ export PROJECT_ID="hogehoge" $ docker run -d --name backend -e PROJECT_ID=$PROJECT_ID backend:v1.0 $ docker run -d --name frontend -p 8080:8080 -e PROJECT_ID=$PROJECT_ID --link backend:backend frontend:v1.0 $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9f5b27a40326 frontend:v1.0 "/opt/gobang/bin/fron" 4 seconds ago Up 4 seconds 0.0.0.0:8080->8080/tcp frontend 690787b5415b backend:v1.0 "/opt/gobang/bin/back" 11 seconds ago Up 10 seconds 8081/tcp backend
ãã£ã¡ãããUIã®ã¯ã©ã¤ã¢ã³ãAPPã¯ã¾ã ãªãã®ã§ãã³ã³ã½ã¼ã«ä¸ã§åä½ããCUIã®ã¢ããªã§ã²ã¼ã ãéãã§ã¿ã¾ããç°å¢å¤æ° API_URL ã§ããã³ãã¨ã³ãã®APIãæå®ãã¦å®è¡ãã¾ãã
$ API_URL=http://localhost:8080/api/v1 client/client.py Welcome to the five-stone game. Game ID (0:new game)? 0 Your game ID is 5649391675244544 0 1 2 3 4 5 6 7 8 9 0 - - - - - - - - - - 1 - - - - - - - - - - 2 - - - - - - - - - - 3 - - - - - - - - - - 4 - - - - - - - - - - 5 - - - - - - - - - - 6 - - - - - - - - - - 7 - - - - - - - - - - 0 - - - - - - - - - - 8 - - - - - - - - - - 9 - - - - - - - - - - (q:quit) x(0-9), y(0-9)? 4,5 0 1 2 3 4 5 6 7 8 9 0 - - - - - - - - - - 1 - - - - - - - - x - 2 - - - - - - - - - - 3 - - - - - - - - - - 4 - - - - - - - - - - 5 - - - - o - - - - - 6 - - - - - - - - - - 7 - - - - - - - - - - 8 - - - - - - - - - - 9 - - - - - - - - - - (q:quit) x(0-9), y(0-9)? 5,5 0 1 2 3 4 5 6 7 8 9 0 - - - - - - - - - - 1 - - - - - - - - x - 2 - - - - - - - - - - 3 - - - - - - - - - - 4 - - - - - - - - - - 5 - - - - o o - - - - 6 - - - - - - - - - - 7 - - - - - - - - - - 8 - - - - - - - - x - 9 - - - - - - - - - - (q:quit) x(0-9), y(0-9)? q Your game ID is 5649391675244544 See you again.
éã³æ¹ã¯ç»é¢ã®æ§åããå¯ãã¦ãã ããããããã²ã¼ã ã®éå§æã«ã²ã¼ã IDãå²ãå½ã¦ãããã®ã§ãéä¸ã§ã²ã¼ã ãä¸æããå ´åã§ããã²ã¼ã IDãæå®ãã¦ã²ã¼ã ãåéãããã¨ãã§ãã¾ããããã§ã¯ãããã¼AIã®ããã¯ã¨ã³ãã使ã£ã¦ããã®ã§ãã³ã³ãã¥ã¼ã¿ã¼ã®æã¯ã©ã³ãã ã§ãããã¼ã«ã«ã®Dockerç°å¢ã使ç¨ããå ´åãæ°ããããã¯ã¨ã³ãã«å ¥ãæ¿ããéã¯ãä¸åº¦ãã³ã³ãããåæ¢ããå¿ è¦ãããã¾ãããµã¼ãã¹ãæä¾ããã¾ã¾ãã£ããã¢ãããã¼ãããã¨ãããã¨ã¯ã§ãã¾ããã
åä½ç¢ºèªãã§ãããããã¼ã«ã«ã®ã³ã³ããã¯åæ¢ã»ç ´æ£ãã¦ããã¾ãã
$ docker stop frontend backend $ docker rm frontend backend
ã³ã³ããã¤ã¡ã¼ã¸ã®ã¢ãããã¼ã
GKEã®ã¯ã©ã¹ã¿ã¼ããã³ã³ããã¤ã¡ã¼ã¸ãå©ç¨ã§ããããã«ãGCPä¸ã®ãã©ã¤ãã¼ãã¬ã¸ã¹ããªã¼ã«ã¤ã¡ã¼ã¸ãã¢ãããã¼ããã¦ããã¾ãã次ã®ããã«ããgcr.io/<PROJECT ID>/åå:ã¿ã°ãã¨ããã¤ã¡ã¼ã¸åãä»ãã¦ãgcloudã³ãã³ãããpushãã¾ããï¼gcloudã³ãã³ãã使ç¨ãããã¨ã«ãããCloud Shellãèµ·åããã¢ã«ã¦ã³ãã®æ¨©éã§ãã©ã¤ãã¼ãã¬ã¸ã¹ããªã¼ã¸ã®ã¢ã¯ã»ã¹ãè¡ããã¾ããï¼
$ docker tag frontend:v1.0 gcr.io/$PROJECT_ID/frontend:v1.0 $ docker tag backend:v1.0 gcr.io/$PROJECT_ID/backend:v1.0 $ docker tag backend:v1.1 gcr.io/$PROJECT_ID/backend:v1.1 $ gcloud docker -- push gcr.io/$PROJECT_ID/frontend:v1.0 $ gcloud docker -- push gcr.io/$PROJECT_ID/backend:v1.0 $ gcloud docker -- push gcr.io/$PROJECT_ID/backend:v1.1 $ gcloud docker -- search gcr.io/$PROJECT_ID NAME DESCRIPTION STARS OFFICIAL AUTOMATED <PROJECT ID>/backend 0 <PROJECT ID>/frontend 0
ã¢ãããã¼ãããã¤ã¡ã¼ã¸ã®å®ä½ã¯ãèªåã®ããã¸ã§ã¯ãã®Cloud Storageï¼ãã±ããåãartifacts.<PROJECT ID>.appspot.comãï¼ã«ä¿åããã¦ãã¾ãã
$ gsutil ls | grep artifacts gs://artifacts.<PROJECT ID>.appspot.com/
ãã©ã¤ãã¼ãã¬ã¸ã¹ããªã¼ã®å 容ã¯ãCloud Consoleããã確èªã§ãã¾ãã
ã³ã³ããã¯ã©ã¹ã¿ã¼ã®ä½æ
Cloud Consoleããã³ã³ããã¯ã©ã¹ã¿ã¼ãä½æãã¾ãã
ã¾ã¼ã³ã¯ãããã¸ã§ã¯ãä½ææã«æå®ããApp Engineã®ãªã¼ã¸ã§ã³ã¨åãç©ãæå®ãã¾ããCloud Datastoreã¯ãApp Engineã¨åããªã¼ã¸ã§ã³ã«ãã¼ã¿ãä¿åããã®ã§ãCloud Datastoreã¸ã®ã¢ã¯ã»ã¹ãæ©ããªãã¾ããã¾ãããããã¸ã§ã¯ãã¸ã®ã¢ã¯ã»ã¹ãã§ãCloud Datastoreãããæå¹ãã«ãã¦ãã ããããããå¿ããã¨ã³ã³ããããCloud Datastoreã¸ã®ã¢ã¯ã»ã¹ãã§ãã¾ããã
ã¯ã©ã¹ã¿ã¼ãä½æã§ããããCloud Shellãã次ã®ã³ãã³ããå®è¡ãã¦ãã¯ã©ã¹ã¿ã¼ãæä½ããããã®ç°å¢è¨å®ãè¡ãã¾ãããgobang-clusterãã¨ãus-central1-aãã¯ãã¯ã©ã¹ã¿ã¼åã¨ã¯ã©ã¹ã¿ã¼ãä½æããã¾ã¼ã³ãæå®ãã¾ãã
$ gcloud container clusters get-credentials gobang-cluster --zone=us-central1-a
ãããå®è¡ããã¨è¨å®ãã¡ã¤ã«ã~/.kube/configããç¨æããã¦ãCloud Shellããkubectlã³ãã³ãã§æä½ã§ããããã«ãªãã¾ãã次ã¯ãã¯ã©ã¹ã¿ã¼å ã®ãã¼ãã確èªããä¾ã§ãã
$ kubectl get nodes NAME STATUS AGE gke-gobang-cluster-default-pool-d43cc941-fkwy Ready 6m gke-gobang-cluster-default-pool-d43cc941-kbnf Ready 6m gke-gobang-cluster-default-pool-d43cc941-w53o Ready 6m
ããã¯ã¨ã³ãã®ãããã¤
ãããã¤è¨å®ãconfig/backend-deployment.yamlããéãã¦ãã³ã³ããã¤ã¡ã¼ã¸åã«å«ã¾ãã<PROJECT ID>ã®é¨åãå®éã«ä½¿ç¨ããããã¸ã§ã¯ãIDãä¿®æ£ãã¾ãã
spec: containers: - image: gcr.io/<PROJECT ID>/backend:v1.0 <-- ã³ã³ name: backend-node ports: - containerPort: 8081
ãããã¤è¨å®ãæå®ãã¦ãã³ã³ããããããã¤ãã¾ããä¸è¨ã®ããã«ã3åã®PodãRunningã«ãªãã°æåã§ãã
$ kubectl create -f config/backend-deployment.yaml deployment "backend-node" created $ kubectl get pods NAME READY STATUS RESTARTS AGE backend-node-3459171109-09yzl 1/1 Running 0 5s backend-node-3459171109-2gs4u 1/1 Running 0 5s backend-node-3459171109-tmkjl 1/1 Running 0 5s
ããã³ãã¨ã³ãã®ã³ã³ããããããã¯ã¨ã³ãã«æ¥ç¶ã§ããããã«ããµã¼ãã¹ãå®ç¾©ãã¾ãã
$ kubectl create -f config/backend-service.yaml service "backend-service" created $ kubectl get services NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE backend-service 10.19.248.188 <none> 8081/TCP 6s kubernetes 10.19.240.1 <none> 443/TCP 19m
ä¸è¨ã®ãCLUSTER-IPããã³ã³ããã«ã¢ã¯ã»ã¹ããããã®ä»£è¡¨IPã«ãªãã¾ãããã®ä¾ã§ã¯ãã10.19.248.188ããå²ãå½ã¦ããã¦ãã¾ããä»ã®ã³ã³ãããããã®IPã«ã¢ã¯ã»ã¹ããã¨ãèªåçã«è¤æ°ã®ããã¯ã¨ã³ãã³ã³ããã¸ã®è² è·åæ£ãè¡ããã¾ããã¾ããã³ã³ããå é¨ã§ã¯å°ç¨ã®DNSãç¨æããã¦ããããbackend-service.default.svc.cluster.localãã¨ãããã¹ãåã«ã¢ã¯ã»ã¹ããã¨ãå ã»ã©ã®ä»£è¡¨IPã¸ã®ã¢ã¯ã»ã¹ãè¡ããã¾ãã
ããã³ãã¨ã³ãã®ãããã¤
ãããã¤è¨å®ãconfig/frontend-deployment.yamlããéãã¦ãã³ã³ããã¤ã¡ã¼ã¸åã«å«ã¾ãã<PROJECT ID>ã®é¨åãå®éã«ä½¿ç¨ããããã¸ã§ã¯ãIDãä¿®æ£ãã¾ãã
spec: containers: - image: gcr.io/<PROJECT ID>/frontend:v1.0 <-- ã³ã³ name: frontend-node ports: - containerPort: 8080
ãããã¤è¨å®ãæå®ãã¦ãã³ã³ããããããã¤ãã¾ããä¸è¨ã®ããã«ã3åã®PodãRunningã«ãªãã°æåã§ãã
$ kubectl create -f config/frontend-deployment.yaml deployment "frontend-node" created $ kubectl get pods NAME READY STATUS RESTARTS AGE backend-node-3459171109-09yzl 1/1 Running 0 6m backend-node-3459171109-2gs4u 1/1 Running 0 6m backend-node-3459171109-tmkjl 1/1 Running 0 6m frontend-node-3555902700-el65p 1/1 Running 0 7s frontend-node-3555902700-irc2x 1/1 Running 0 7s frontend-node-3555902700-jvfkm 1/1 Running 0 7s
å¤é¨ããããã³ãã¨ã³ãã«ã¢ã¯ã»ã¹ã§ããããã«ããµã¼ãã¹ãå®ç¾©ãã¾ãã
$ kubectl create -f config/frontend-service.yaml service "frontend-service" created
ãã¡ãã®ãµã¼ãã¹å®ç¾©ãã¡ã¤ã«ã«ã¯ããtype: LoadBalancerãã¨ããæå®ãããã¾ããããã«ãã£ã¦ãGCPã®Global Load Balancerãèªåçã«æ§æããã¦ããã¼ããã©ã³ãµã¼çµç±ã§ããã³ãã¨ã³ãã«ã¢ã¯ã»ã¹ã§ããããã«ãªãã¾ãããã°ããå¾ ã¤ã¨ãä¸è¨ã®ããã«ãEXTERNAL-IPããã»ããããã¦ããããå¤é¨ããã¢ã¯ã»ã¹ããéã®IPã¢ãã¬ã¹ã«ãªãã¾ããï¼å¤é¨ã¢ã¯ã»ã¹ç¨ã®IPã¢ãã¬ã¹ã¯èªåçã«å²ãå½ã¦ãã®ã§ã¯ãªããäºåã«ç¢ºä¿ãã¦ãããIPãæ示çã«æå®ãããã¨ãã§ãã¾ããï¼
$ kubectl get services NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE backend-service 10.19.248.188 <none> 8081/TCP 10m frontend-service 10.19.242.12 104.154.52.102 80/TCP 2m kubernetes 10.19.240.1 <none> 443/TCP 30m
ã¯ã©ã¤ã¢ã³ãå´ã§ã¯ããã®IPã¢ãã¬ã¹ãæå®ãããã¨ã§ãã²ã¼ã ãéã¹ãããã«ãªãã¾ãã次ã¯ãã²ã¼ã IDãæå®ãã¦ãå ã»ã©ã®ç¶ããéã¶ä¾ã§ãã
$ API_URL=http://104.154.52.102/api/v1 client/client.py Welcome to the five-stone game. Game ID (0:new game)? 5649391675244544 Your game ID is 5649391675244544 0 1 2 3 4 5 6 7 8 9 0 - - - - - - - - - - 1 - - - - - - - - x - 2 - - - - - - - - - - 3 - - - - - - - - - - 4 - - - - - - - - - - 5 - - - - o o - - - - 6 - - - - - - - - - - 7 - - - - - - - - - - 8 - - - - - - - - x - 9 - - - - - - - - - - (q:quit) x(0-9), y(0-9)? 4,4 0 1 2 3 4 5 6 7 8 9 0 - - - - - - - - - - 1 - - - - - - - - x - 2 - - - - - - - - - - 3 - - - - - - - - - - 4 - - - - o - - - - - 5 - - - - o o - - - - 6 - - x - - - - - - - 7 - - - - - - - - - - 8 - - - - - - - - x - 9 - - - - - - - - - - (q:quit) x(0-9), y(0-9)?
ãã ããããã¯ã¨ã³ãã®AIã¯ç¸å¤ãããããã¼ã§ããããã
ããã¯ã¨ã³ãã®ã¢ãããã¼ã
ããã§ãå ã»ã©ã®ã¯ã©ã¤ã¢ã³ããåæ¢ããã«ããã£ããã¨ããã¯ã¨ã³ããã¢ãããã¼ããã¾ããCloud Shellã®ç»é¢ã®ä¸ã«ãããï¼ããã¿ã³ã§ã·ã§ã«ç»é¢ãæ°ããéãããã次ã®ã³ãã³ããå®è¡ãã¾ãã
$ kubectl edit deployment/backend-node
ããã¯ã¨ã³ãã®ãããã¤ã¡ã³ãè¨å®ãã¨ãã£ã¿ã¼ã§éãã®ã§ãã¤ã¡ã¼ã¸ã®ã¿ã°åããv1.1ãã«ä¿®æ£ãã¦ä¿åãã¾ãã
spec: containers: - image: gcr.io/<PROJECT ID>/backend:v1.1 <--ã³ã³ imagePullPolicy: IfNotPresent name: backend-node
次ã®ããã«ãããã¯ã¨ã³ãã®Podãåãããã¤ããã¦ãããã¨ããããã¾ãã
$ kubectl get pods NAME READY STATUS RESTARTS AGE backend-node-3540566822-0ukin 0/1 ContainerCreating 0 13s backend-node-3540566822-2n0u3 1/1 Running 0 13s backend-node-3540566822-hsxys 1/1 Running 0 11s frontend-node-3555902700-el65p 1/1 Running 0 13m frontend-node-3555902700-irc2x 1/1 Running 0 13m frontend-node-3555902700-jvfkm 1/1 Running 0 13m
ãããã¤è¨å®ã®ãã¹ããªã¼ã確èªããã¨ãæ°ããã¤ã¡ã¼ã¸ã®Podãèµ·åããå¾ã«ãå¤ãã¤ã¡ã¼ã¸ã®Podãåæ¢ããã¨ããæä½ãé çªã«è¡ããããã¨ããããã¾ãã
$ kubectl describe deployment/backend-node Name: backend-node Namespace: default CreationTimestamp: Wed, 10 Aug 2016 14:54:53 +0900 Labels: name=backend-node Selector: name=backend-node Replicas: 3 updated | 3 total | 3 available | 0 unavailable StrategyType: RollingUpdate MinReadySeconds: 0 RollingUpdateStrategy: 1 max unavailable, 1 max surge OldReplicaSets: <none> NewReplicaSet: backend-node-3540566822 (3/3 replicas created) Events: FirstSeen LastSeen Count From SubobjectPath Type Reason Message --------- -------- ----- ---- ------------- -------- ------ ------- 19m 19m 1 {deployment-controller } Normal ScalingReplicaSet Scaled up replica set backend-node-3459171109 to 3 36s 36s 1 {deployment-controller } Normal ScalingReplicaSet Scaled up replica set backend-node-3540566822 to 1 36s 36s 1 {deployment-controller } Normal ScalingReplicaSet Scaled down replica set backend-node-3459171109 to 2 36s 36s 1 {deployment-controller } Normal ScalingReplicaSet Scaled up replica set backend-node-3540566822 to 2 34s 34s 1 {deployment-controller } Normal ScalingReplicaSet Scaled down replica set backend-node-3459171109 to 1 34s 34s 1 {deployment-controller } Normal ScalingReplicaSet Scaled up replica set backend-node-3540566822 to 3 33s 33s 1 {deployment-controller } Normal ScalingReplicaSet Scaled down replica set backend-node-3459171109 to 0
ã¯ã©ã¤ã¢ã³ãã®ç»é¢ã«æ»ã£ã¦ã²ã¼ã ãç¶ããã¨ãã³ã³ãã¥ã¼ã¿ã¼ãã¾ã¨ããªæãæã¤ããã«å¤ãã£ã¦ãã¾ãããã£ãã¼ã
0 1 2 3 4 5 6 7 8 9 0 - - - - - - - - - - 1 - - - - - - - - x - 2 - - - - - - - - - - 3 - - - - - - - - - - 4 - - - - o - - - - - 5 - - - - o o - - - - 6 - - x - - - - - - - 7 - - - - - - - - - - 8 - - - - - - - - x - 9 - - - - - - - - - - (q:quit) x(0-9), y(0-9)? 4,6 0 1 2 3 4 5 6 7 8 9 0 - - - - - - - - - - 1 - - - - - - - - x - 2 - - - - - - - - - - 3 - - - - - - - - - - 4 - - - - o - - - - - 5 - - - - o o - - - - 6 - - x - o - - - - - 7 - - - - x - - - - - 8 - - - - - - - - x - 9 - - - - - - - - - - (q:quit) x(0-9), y(0-9)? 4,3 0 1 2 3 4 5 6 7 8 9 0 - - - - - - - - - - 1 - - - - - - - - x - 2 - - - - x - - - - - 3 - - - - o - - - - - 4 - - - - o - - - - - 5 - - - - o o - - - - 6 - - x - o - - - - - 7 - - - - x - - - - - 8 - - - - - - - - x - 9 - - - - - - - - - - (q:quit) x(0-9), y(0-9)?
å¾çä»ã
ãµã¼ãã¹ã¨ãããã¤ãåé¤ãã¾ãããµã¼ãã¹ãåé¤ããã¿ã¤ãã³ã°ã§ãGlobal Load Balancerã®è¨å®ãç ´æ£ããã¾ãã
$ kubectl delete service frontend-service $ kubectl delete service backend-service $ kubectl delete deployment frontend-node $ kubectl delete deployment backend-node
ãã®å¾ã¯ãCloud Consoleããã³ã³ããã¯ã©ã¹ã¿ã¼ã®åé¤ãCloud Storageã®ãã©ã¤ãã¼ãã¬ã¸ã¹ããªã¼ç¨ãã±ããã®åé¤ãCloud Datastoreã«ä¿åãããEntityï¼ãGameBoardsãã¨ããKindï¼ã®åé¤ãªã©ãè¡ãã¾ãã
Disclaimer: All code snippets are released under Apache 2.0 License. This is not an official Google product.