5.4. 修复无法删除的集群

在某些情况下,如果您尝试删除集群,OpenShift Cluster Manager Hybrid Cloud Console 中会出现以下错误。

Error deleting cluster
CLUSTERS-MGMT-400: Failed to delete cluster <hash>: sts_user_role is not linked to your account. sts_ocm_role is linked to your organization <org number> which requires sts_user_role to be linked to your Red Hat account <account ID>.Please create a user role and link it to the account: User Account <account ID> is not authorized to perform STS cluster operations

Operation ID: b0572d6e-fe54-499b-8c97-46bf6890011c

如果您尝试从 CLI 删除集群,则会出现以下错误。

E: Failed to delete cluster <hash>: sts_user_role is not linked to your account. sts_ocm_role is linked to your organization <org_number> which requires sts_user_role to be linked to your Red Hat account <account_id>.Please create a user role and link it to the account: User Account <account ID> is not authorized to perform STS cluster operations

user-role 被取消链接或删除,会发生此错误。

流程

  1. 运行以下命令来创建 user-role IAM 资源:

    $ rosa create user-role
  2. 在可以看到创建的角色后,您可以删除集群。以下确认,角色已创建并被链接:

    I: Successfully linked role ARN <user role ARN> with account <account ID>