2016-07-15 28 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