SuperAPI AI 工具集

huawei-cloud-ucs-cluster-onboarding-manager

部署与运维

查看项目

更新于 10-16 09:56

技能介绍

用途:通过 hcloud CLI 对华为云 UCS(Ubiquitous Cloud Native Service)进行集群注册、生命周期与舰队分组管理,调用链为 hcloud CLI → UCS 服务 API → 集群/集群组/访问配置/KubeConfig 资源。

主要能力:注册自管或 CCE 集群到 UCS、从 UCS 移除集群、查询集群详情与列表、更新集群属性与元数据、创建/删除/更新/查询舰队组、集群加入或移出舰队组、重试集群激活、获取集群访问信息与 kubeconfig、下载多集群联邦 kubeconfig、查询 UCS 资源配额。

必要用法:需安装 hcloud CLI(版本 >= 7.2.2),首次使用运行 printf "y\n" | hcloud version 接受隐私声明。凭据通过环境变量配置:长期 AK/SK 使用 HUAWEI_CLOUD_AK、HUAWEI_CLOUD_SK、HUAWEI_CLOUD_REGION;临时凭据额外设置 HUAWEI_CLOUD_SECURITY_TOKEN。核心命令包括 hcloud UCS RegisterCluster、ShowCluster、ShowClusterList、UpdateCluster、DeleteCluster、RegisterClusterGroup、ListClusterGroup、JoinGroup、LeaveGroup、CreateClusterKubeconfig、DownloadFederationKubeconfig、ShowQuota 等。

限制与注意:UCS 集群接入为付费服务,执行 RegisterCluster 前须获得用户明确同意;DeleteCluster 不可逆。集群 K8s 版本需在 UCS 支持范围内,应动态查询而非硬编码,例如 hcloud UCS ListRegisteredClusterVersions --cli-region=cn-north-4。CCE 集群(category=self)获取 kubeconfig 须用 CCE API CreateKubernetesClusterCert,而非 UCS CreateClusterKubeconfig;ShowClusterAccessInfo 仅适用于 onpremise 集群。ListManagedClusters 需账户级 IAM 委托配置。凭据严禁泄露或使用 echo 输出。需相应 IAM 权限,权限不足时参考 references/iam-policies.md。