为什么在创建 VPC 集群时发生 infrastructure operation failed 错误?

在处理集群时,排查资源组权限错误。

当您尝试创建 VPC 群集时,会看到与下例类似的错误信息。

Unable to create cluster. The 'vpc-gen2' infrastructure operation failed with the message: the provided token is not authorized to view the specified subnet (ID:XXXX) in this account

尝试创建集群的用户或服务标识的 API 密钥不具有查看帐户中 VPC 子网所需的 IAM 许可权。

此错误的常见场景是 VPC 子网位于集群中的不同资源组中。 确保用于创建集群的 API 密钥至少具有对这些子网的 查看者 访问权。

完成以下步骤以解决该问题。

  1. 查看 准备帐户以创建集群 文档中的步骤。

  2. 查看用于创建集群的 API 密钥的详细信息。

    ibmcloud oc api-key info
    

    示例输出

    ibmcloud oc api-key info -c CLUSTER
    Getting information about the API key owner for cluster CLUSTER...
    OK
    Name                Email
    User 2   usertwo@us.ibm.com
    
  3. 为错误消息中提到的 VPC 子网或 VPC 中的所有子网添加 查看者 访问角色。

  4. 请重试集群创建步骤。

  5. 如果问题仍然存在,请联系支持团队。 打开 支持案例。 在案例详细信息中,请确保包含任何相关日志文件,错误消息或命令输出。