1 min read

GCP gcloud 常用指令

mac

brew install --cask gcloud-cli

相關指令

gcloud auth login  # 登入gcp 

# 快捷初始化
gcloud init 


gcloud projects list # 查詢project 
gcloud config set project ${project_name} # 連線

gcloud compute instances list

gke

連接異常回報  gke-gcloud-auth-plugin

需安裝插件

如果是透過 brew 安裝gcloud 
brew install --cask google-cloud-sdk

# 安裝插件
gcloud components install gke-gcloud-auth-plugin

# 驗證安裝
gke-gcloud-auth-plugin --version