无法使用gcloud命令创建实例

时间:2016-07-15 21:38:12

标签: google-compute-engine gcloud

我正在尝试在Google Compute中创建一个错误的实例。

 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 'xxxxx@project.gserviceaccount.com' of type 'serviceAccount' was not found.

资源未列在IAM或ServiceAccount列表中。

1 个答案:

答案 0 :(得分:1)

First assure you have initialized your gcloud account ...问题

gcloud auth login   

然后解释粘贴到浏览器(您之前登录过Google)并将浏览器生成的令牌放回命令行...一旦它开心你就完成了...继续现在启动你的集群。 ..如果您希望通过使用服务帐户(不必要)来获得它的设置然后发出

gcloud auth activate-service-account    # optional