Answer a question

Hi I am getting following error

ERROR: (gcloud.container.clusters.create) ResponseError: code=400, message=Failed precondition when calling the ServiceConsumerManager: tenantmanager::185014: Consumer 370525719069 should enable service:container.googleapis.com before generating a service account.

can someone help me ?

Answers

You should enable API service - container.googleapis.com, execute command:

$ gcloud services enable container.googleapis.com

Please take a look at this intorduction especially: environment setup and cluster creation on GKE.

See more: gcp-enabling-disabling-services, troubleshooting-enabling-gcp-services, enabling-gcp-services-example.

Another option:

It hard to answer due to lack of important additional information (e.g. environment )but such error may indicate that you are working on some kind of multi-tenancy environment. Make sure that you have proper rights to create new clusters:

Assign roles using IAM
You can control access to Google Cloud resources through IAM policies. Start by identifying the groups needed for your organization and their scope of operations, then assign the appropriate IAM role to the group. Use Google Groups to efficiently assign and manage IAM for users.

See: enterprise-multitenancy-roles.

Also take a look on best practices how to set up multi-tenant-cluster-gke-enterprise.

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐