GCP - gcloud config 設定配置使用
Published in:2023-05-06 | category: GCP


安裝 gcloud-cli


參考安裝教學


curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-430.0.0-linux-x86_64.tar.gz

tar -xf google-cloud-cli-430.0.0-linux-x86.tar.gz

./google-cloud-sdk/install.sh


查看配置列表

gcloud config configurations list


查看本機用戶

gcloud auth list


新增配置

gcloud config configurations create [name]


帳號登入

gcloud auth login

設定專案

gcloud config set project [project name]

設定地區

gcloud config set compute/zone [zone name]

設定地域

gcloud config set compute/region [region name]


切換配置

gcloud config configurations activate [name]


刪除配置

ps. 要先切換配置才能刪除


gcloud config configurations delete [name]

Prev:
HUGO - 如何更換主題 (測試機)
Next:
GCP - 安裝內建監控 Ops agent 代理