2020-12-07
gcp Container clusters 紀錄一下
大概就是
開 Container
deploy nginx
nginx 設成 NLB
replicas 成 3 台
首先 enabled:
Kubernetes Engine API Container Registry API
在 Cloud Shell.
export MY_ZONE=us-central1-a
gcloud container clusters create webfrontend --zone $MY_ZONE --num-nodes 2
kubectl version
kubectl create deploy nginx --image=nginx:1.17.10
kubectl get pods
kubectl expose deployment nginx --port 80 --type LoadBalancer
kubectl get services
kubectl scale deployment nginx --replicas 3
kubectl get pods
kubectl get services