第 15 章 销毁托管集群
15.1. 销毁 AWS 上的托管集群 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
您可以使用命令行界面(CLI)在 Amazon Web Services (AWS)上销毁托管集群及其受管集群资源。
15.1.1. 使用 CLI 销毁 AWS 上的托管集群 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
您可以使用命令行界面(CLI)销毁 Amazon Web Services (AWS)上的托管集群。
流程
运行以下命令,删除多集群引擎 Operator 上的受管集群资源:
$ oc delete managedcluster <hosted_cluster_name>1 - 1
- 将
<hosted_cluster_name>替换为集群的名称。
运行以下命令来删除托管集群及其后端资源:
$ hcp destroy cluster aws \ --name <hosted_cluster_name> \1 --infra-id <infra_id> \2 --role-arn <arn_role> \3 --sts-creds <path_to_sts_credential_file> \4 --base-domain <basedomain>5 重要如果您的 AWS 安全令牌服务(STS)的会话令牌已过期,请运行以下命令在名为
sts-creds.json的 JSON 文件中检索 STS 凭证:$ aws sts get-session-token --output json > sts-creds.json