2016-07-15 62 views
1

我試圖在Google Compute中創建一個實例來獲取錯誤。無法使用gcloud命令創建實例

gcloud compute instances create 'my-instance' 
For the following instances: 
- [my-instance] 
choose a zone: 
[1] asia-east1-b 
[2] asia-east1-c 
[3] asia-east1-a 
[4] europe-west1-c 
[5] europe-west1-b 
[6] europe-west1-d 
[7] us-central1-f 
[8] us-central1-a 
[9] us-central1-c 
[10] us-central1-b 
[11] us-east1-b 
[12] us-east1-d 
[13] us-east1-c 
Please enter your numeric choice: 11 

ERROR: (gcloud.compute.instances.create) Some requests did not succeed: 
- The resource '[email protected]' of type 'serviceAccount' was not found. 

該資源未在IAM或ServiceAccount列表中列出。

回答

1

First assure you have initialized your gcloud account ...問題

gcloud auth login 

然後,因爲它解釋粘貼到瀏覽器(你在之前已登錄到谷歌),並把瀏覽器生成的令牌返回到命令行......一旦它的快樂你完成...繼續並立即啓動您的羣集...如果您希望通過使用服務帳戶(不是必需的)進行設置,請執行其設置,然後發出

gcloud auth activate-service-account # optional