简体   繁体   中英

“gcloud container clusters create fails” with “container.clusters.create” permission error

When I create kubernetes cluster with gcloud container clusters create command, a permission error occurs as follows:

$ gcloud container clusters create my-k8s
WARNING: Currently node auto repairs are disabled by default. In the future this will change and they will be enabled by default. Use `--[no-]enable-autorepair` flag  to suppress this warning.
WARNING: Starting in Kubernetes v1.10, new clusters will no longer get compute-rw and storage-ro scopes added to what is specified in --scopes (though the latter will remain included in the default --scopes). To use these scopes, add them explicitly to --scopes. To use the new behavior, set container/new_scopes_behavior property (gcloud config set container/new_scopes_behavior true).
ERROR: (gcloud.container.clusters.create) ResponseError: code=403, message=Required "container.clusters.create" permission for "projects/test-project".

How I can solve this error ?

Thanks

I could start with the following command:

gcloud container clusters create my-k8s --project  test-project-xxxxxx 

Note: Without a project name without number, the creation fails with the same error.

gcloud container clusters create my-k8s --project  test-project

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM