Install
openclaw skills install @huaweiclouddev/huawei-cloud-ucs-cluster-onboarding-managerHuawei Cloud UCS cluster onboarding, lifecycle, and fleet management via hcloud CLI. Register/query/remove clusters, manage fleet groups, obtain kubeconfig, check quotas. Trigger: "UCS cluster onboarding", "UCS 集群纳管", "UCS fleet", "UCS 舰队", "UCS kubeconfig", "UCS federation", "UCS 联邦", "UCS 配额", "cluster lifecycle", "纳管集群", "集群管理"
openclaw skills install @huaweiclouddev/huawei-cloud-ucs-cluster-onboarding-managerThis skill provides cluster onboarding, lifecycle, and fleet grouping management capabilities for Huawei Cloud UCS (Ubiquitous Cloud Native Service) using the hcloud CLI.
Architecture: hcloud CLI → UCS Service API → Cluster/ClusterGroup/AccessConfig/KubeConfig resources
Related Skills:
huawei-cloud-ucs-policy-governor - UCS policy governance, compliance, and audit managementCapabilities:
Typical Use Cases:
hcloud version to verify installationprintf "y\n" | hcloud version to accept privacy statementhcloud CLI supports two credential modes via environment variables, automatically detected at runtime:
Mode A — Long-term AK/SK (permanent access):
export HUAWEI_CLOUD_AK=<your-ak>
export HUAWEI_CLOUD_SK=<your-sk>
export HUAWEI_CLOUD_REGION=cn-north-4
Mode B — Temporary AK/SK + SecurityToken (recommended for temporary or delegated access):
export HUAWEI_CLOUD_AK=<your-temp-ak>
export HUAWEI_CLOUD_SK=<your-temp-sk>
export HUAWEI_CLOUD_SECURITY_TOKEN=<your-security-token>
export HUAWEI_CLOUD_REGION=cn-north-4
When
HUAWEI_CLOUD_SECURITY_TOKENis present, hcloud CLI automatically uses temporary credential authentication. When only AK/SK are set, it uses long-term credential authentication.
echo $HUAWEI_CLOUD_AK or echo $HUAWEI_CLOUD_SK to check credentialsHUAWEI_CLOUD_AK, HUAWEI_CLOUD_SK, HUAWEI_CLOUD_REGION, HUAWEI_CLOUD_SECURITY_TOKEN⚠️ Important Security Notes:
⚠️ UCS has a maximum supported Kubernetes version limit. CCE clusters created with default settings may use a version that exceeds UCS support range. Registering an unsupported version will fail with error UCS.01030012: Register cce cluster error - cce cluster version not support in UCS service (verified: CCE default creates v1.35, UCS supports up to v1.34 as of 2025-07). Always query the supported versions dynamically — do not hardcode version numbers, as UCS updates its support range over time:
hcloud UCS ListRegisteredClusterVersions --cli-region=cn-north-4
Pre-registration Version Check:
# List unimported CCE clusters to check their versions
hcloud UCS ListManagedClusters --unimported=true --cli-region=cn-north-4
# Or check specific CCE cluster version via CCE API
hcloud CCE ShowCluster --clusterid=<cce-cluster-id> --cli-region=cn-north-4
If the cluster K8s version exceeds UCS support range, either:
| API Action | Permission | Purpose |
|---|---|---|
ucs:cluster:create | Register cluster | Register cluster to UCS |
ucs:cluster:delete | Delete cluster | Remove cluster from UCS |
ucs:cluster:get | Get cluster | View cluster details |
ucs:cluster:list | List clusters | List all managed clusters |
ucs:cluster:update | Update cluster | Modify cluster properties |
ucs:clusterGroup:create | Create group | Create fleet group |
ucs:clusterGroup:delete | Delete group | Remove fleet group |
ucs:clusterGroup:get | Get group | View fleet group details |
ucs:clusterGroup:update | Update group | Update fleet group description |
ucs:clusterAccess:get | Get access info | Obtain cluster access information |
ucs:quota:get | Get quota | Check UCS resource quotas |
ucs:kubeconfig:create | Create kubeconfig | Obtain cluster kubeconfig |
ucs:federationKubeconfig:get | Get federation | Download federation kubeconfig |
See IAM Permission Policies for complete policy JSON.
Permission Failure Handling:
references/iam-policies.mdSee Task: Cluster Registration for detailed workflows.
RegisterCluster uses Kubernetes API-style parameters (apiVersion, kind, metadata., spec.).
# Register a CCE cluster to UCS (⚠️ paid service: requires user confirmation)
# **Confirm with user before executing** — UCS cluster onboarding is a paid service, costs will be incurred
hcloud UCS RegisterCluster --apiVersion=v1 --kind=Cluster --metadata.name=prod-backend-cluster --spec.category=self --spec.provider=huaweicloud --spec.type=turbo --spec.manageType=discrete --spec.country=CN --spec.city=110000 --metadata.uid=<cce-cluster-id> --spec.projectID=<project-id> --spec.region=cn-north-4 --cli-region=cn-north-4
# Register a CCE cluster and assign to fleet group at registration
hcloud UCS RegisterCluster --apiVersion=v1 --kind=Cluster --metadata.name=prod-backend-cluster --spec.category=self --spec.provider=huaweicloud --spec.type=turbo --spec.manageType=discrete --spec.country=CN --spec.city=110000 --metadata.uid=<cce-cluster-id> --spec.projectID=<project-id> --spec.region=cn-north-4 --spec.clusterGroupID=<group-id> --cli-region=cn-north-4
# Register a self-managed/attached cluster
hcloud UCS RegisterCluster --apiVersion=v1 --kind=Cluster --metadata.name=datacenter-k8s --spec.category=onpremise --spec.provider=self_managed --spec.type=Kubernetes --spec.manageType=discrete --spec.country=CN --spec.city=110000 --metadata.annotations.kubeconfig=<kubeconfig-yaml-content> --cli-region=cn-north-4
# Retry cluster activation (if registration stuck)
hcloud UCS RetryClusterActivation --clusterid=<ucs-cluster-id> --cli-region=cn-north-4
# Remove a cluster from UCS (⚠️ destructive: requires user confirmation)
# **Confirm with user before executing** — deregistration is irreversible
hcloud UCS DeleteCluster --clusterid=<ucs-cluster-id> --cli-region=cn-north-4
Cluster Categories (spec.category):
self: Huawei Cloud CCE (Cloud Container Engine) managed cluster
CreateKubernetesClusterCert to obtain kubeconfig (NOT UCS CreateClusterKubeconfig)ShowClusterAccessInfo returns UCS.01030011 — NOT supported for this categoryRetryClusterActivation returns UCS.01000011 — NOT supported for this categoryspec.category is Turbo, but UCS ListManagedClusters returns category=self, type=turboonpremise: Self-managed or third-party Kubernetes cluster
ShowClusterAccessInfo to obtain proxy-agent configuration, then deploy proxy-agentCreateClusterKubeconfig to obtain kubeconfig after proxy-agent is runningKubeconfig Retrieval Decision Tree (verified via API testing):
Need cluster kubeconfig?
├── category=self (CCE cluster)
│ └── CCE CreateKubernetesClusterCert --cluster_id=<cce-cluster-id> --duration=30
│ (CCE API, NOT UCS CreateClusterKubeconfig which returns internal error)
└── category=onpremise (self-managed cluster)
├── Step 1: ShowClusterAccessInfo --clusterid=<ucs-cluster-id>
│ (obtain proxy-agent configuration — only for onpremise, returns UCS.01030011 for CCE)
├── Step 2: Deploy proxy-agent in the cluster
└── Step 3: CreateClusterKubeconfig --clusterid=<ucs-cluster-id>
(obtain kubeconfig after tunnel established)
Cluster Providers (spec.provider):
huaweicloud: Huawei Cloud managed CCE clusterself_managed: Self-managed Kubernetes clusterManage Types (spec.manageType):
grouped: Cluster managed within a fleet groupdiscrete: Cluster managed independently# Show cluster details
hcloud UCS ShowCluster --clusterid=<ucs-cluster-id> --cli-region=cn-north-4
# List managed clusters (with pagination)
hcloud UCS ShowClusterList --limit=20 --offset=0 --cli-region=cn-north-4
# List managed clusters with filters
hcloud UCS ShowClusterList --category=CCE --enablestatus=Available --clustergroupid=<group-id> --cli-region=cn-north-4
# List all managed clusters (with optional unimported flag)
# ⚠️ Prerequisite: ListManagedClusters requires IAM agency delegation configured at account level.
# If not configured, returns UCS.01010005: get IAM agency's token error.
# See references/common-pitfalls.md Pitfall 20 for IAM agency setup instructions.
hcloud UCS ListManagedClusters --cli-region=cn-north-4
hcloud UCS ListManagedClusters --unimported=true --cli-region=cn-north-4
# Update cluster properties (K8s API-style params) (⚠️ modification: requires user confirmation)
# **Confirm with user before executing**
hcloud UCS UpdateCluster --clusterid=<ucs-cluster-id> --apiVersion=v1 --kind=Cluster --spec.city=310000 --spec.country=CN --cli-region=cn-north-4
# Show cluster access information (only for category=onpremise clusters)
hcloud UCS ShowClusterAccessInfo --clusterid=<ucs-cluster-id> --cli-region=cn-north-4
# Show cluster access information with optional filters (only for category=onpremise clusters)
hcloud UCS ShowClusterAccessInfo --clusterid=<ucs-cluster-id> --region=cn-north-4 --vpcendpoint=<vpc-id> --cli-region=cn-north-4
⚠️ ShowClusterAccessInfo only applies to
category=onpremiseclusters. Forcategory=self(CCE) clusters, it returnsUCS.01030011: Cluster category not supported(verified). For CCE cluster kubeconfig, use CCE APICreateKubernetesClusterCertinstead of UCSCreateClusterKubeconfig.
ShowClusterList Valid Filter Parameters:
--category: Filter by cluster category (self, onpremise)--clustergroupid: Filter by fleet group ID--clusterids: Filter by specific cluster IDs--enablestatus: Filter by cluster status (Available, Unavailable)--managetype: Filter by manage type (grouped, discrete)--limit: Pagination limit--offset: Pagination offset--order: Sort order (asc, desc)--order_by: Sort field⚠️
--namefilter is NOT supported by ShowClusterList API. To find a cluster by name, callShowClusterListwithout name filter and match bymetadata.namein the response locally.
See Task: Fleet Management for detailed workflows.
# Create a fleet group
hcloud UCS RegisterClusterGroup --metadata.name=production-fleet --spec.description="All production clusters" --spec.clusterIds.1=<cluster-id-1> --cli-region=cn-north-4
# List all fleet groups
hcloud UCS ListClusterGroup --limit=20 --offset=0 --cli-region=cn-north-4
# Show fleet group details
hcloud UCS ShowClusterGroup --clustergroupid=<group-id> --cli-region=cn-north-4
# Update fleet group description (⚠️ modification: requires user confirmation)
# **Confirm with user before executing**
hcloud UCS UpdateClusterGroup --clustergroupid=<group-id> --description="Updated fleet description" --cli-region=cn-north-4
# Add clusters to fleet group (⚠️ modification: requires user confirmation)
# **Confirm with user before executing**
hcloud UCS UpdateClusterGroupAssociatedClusters --clustergroupid=<group-id> --clusterIds.1=<cluster-id-1> --clusterIds.2=<cluster-id-2> --cli-region=cn-north-4
# Add a single cluster to fleet group (join)
hcloud UCS JoinGroup --clusterid=<ucs-cluster-id> --clusterGroupID=<group-id> --cli-region=cn-north-4
# Remove a cluster from fleet group (leave)
hcloud UCS LeaveGroup --clusterid=<ucs-cluster-id> --cli-region=cn-north-4
# Delete a fleet group (⚠️ destructive: requires user confirmation)
# **Confirm with user before executing** — deletion removes the group but clusters remain registered
hcloud UCS DeleteClusterGroup --clustergroupid=<group-id> --cli-region=cn-north-4
See Task: Access Management for detailed workflows.
# Get kubeconfig for a specific cluster (⚠️ only for category=onpremise clusters)
# For category=self (CCE) clusters, use: hcloud CCE CreateKubernetesClusterCert --cluster_id=<cce-id> --duration=30 --cli-region=cn-north-4
hcloud UCS CreateClusterKubeconfig --clusterid=<ucs-cluster-id> --cli-region=cn-north-4
# Create cluster configuration
hcloud UCS CreateClusterConf --clusterid=<ucs-cluster-id> --cli-region=cn-north-4
# Download federation kubeconfig (for multi-cluster access)
hcloud UCS DownloadFederationKubeconfig --clustergroupid=<group-id> --duration=3600 --cli-region=cn-north-4
DownloadFederationKubeconfig Required Parameters:
--clustergroupid: Fleet group ID (required path parameter)--duration: Token validity duration in seconds (required integer body parameter)# Show UCS resource quotas (domainid is required - account ID)
hcloud UCS ShowQuota --domainid=<account-id> --cli-region=cn-north-4
⚠️ Cost Notice: UCS cluster onboarding is a paid service. Registering a cluster to UCS incurs costs. Before executing
RegisterClusteror other onboarding operations, you must confirm with the user whether they agree to incur costs and obtain explicit consent before proceeding.
| Parameter | Required/Optional | Description | Default |
|---|---|---|---|
--cli-region | Required | Huawei Cloud region ID | Config value or HUAWEI_CLOUD_REGION |
--clusterid | Context-dependent | UCS cluster ID | N/A |
--clustergroupid | Context-dependent | Fleet group ID | N/A |
| Parameter | Required | Description | Constraints |
|---|---|---|---|
--spec.category | Yes | Cluster category | self (CCE) or onpremise (self-managed) |
--spec.provider | Yes | Cluster provider | huaweicloud or self_managed |
--spec.type | Yes | Cluster type | cce, baremetal, Kubernetes, etc. |
--spec.manageType | Yes | Management type | grouped or discrete |
--metadata.uid | CCE only | CCE cluster ID | Must reference existing CCE cluster |
--spec.projectID | CCE only | Project ID | Obtain via ListManagedClusters response |
--spec.clusterGroupID | No | Assign to fleet at registration | Valid fleet group ID |
| Operation | CLI Command | Risk Level | Confirmation Required |
|---|---|---|---|
RegisterCluster | hcloud UCS RegisterCluster | High | UCS onboarding is a paid service; after registration, the cluster will be subject to UCS policy governance constraints. Confirm cluster name, category, and billing consent. |
DeleteCluster | hcloud UCS DeleteCluster | High | Deregistration is irreversible; the cluster loses all UCS management capabilities, policy governance, and fleet association. Confirm cluster ID before proceeding. |
UpdateCluster | hcloud UCS UpdateCluster | Medium | Modifies cluster properties (e.g., location, labels). Confirm the changes before proceeding. |
RegisterClusterGroup | hcloud UCS RegisterClusterGroup | Medium | Creates a new fleet group for cluster organization. Confirm group name and description. |
DeleteClusterGroup | hcloud UCS DeleteClusterGroup | High | Deletes the fleet group; clusters remain registered but lose group-level governance and federation access. Confirm group ID before proceeding. |
UpdateClusterGroup | hcloud UCS UpdateClusterGroup | Medium | Modifies fleet group description. Confirm the new description. |
JoinGroup | hcloud UCS JoinGroup | Medium | Joining a fleet group affects the cluster's governance scope and policy execution. Confirm cluster ID and target group ID. |
LeaveGroup | hcloud UCS LeaveGroup | Medium | Leaving a fleet group affects the cluster's governance scope and policy execution; the cluster will no longer be governed by group-level policies. Confirm cluster ID. |
See Parameter Reference for complete parameter tables.
See Output Format for detailed response format examples (ShowCluster, ShowClusterList, ShowQuota).
Key Fields Summary:
metadata.uid (UUID), spec.category (onpremise/self), status.phase (Failed/Available)items[] (k8s-style array), total (count)quotas.resources[] with type/quota/used/min/maxSee Verification Method for step-by-step verification.
prod-app-backend, staging-data-pipeline) via --metadata.name--metadata.annotations.kubeconfig--duration for federation kubeconfig tokens based on usage patternsThe skill workflow is as follows:
ListRegisteredClusterVersions to get the list of K8s versions supported by UCS, and confirm the target cluster version is in the list--spec.category=self --spec.provider=huaweicloud --spec.type=turbo--spec.category=onpremise --spec.provider=self_managed (requires kubeconfig)ShowCluster or ShowClusterList to confirm cluster status is AvailableRegisterClusterGroup / JoinGroup / LeaveGroupCreateKubernetesClusterCert, third-party clusters use ShowClusterAccessInfo + proxy-agentUpdateCluster (requires user confirmation)DeleteCluster (⚠️ irreversible operation, requires user confirmation)All operations use hcloud UCS <Operation> --<param>=<value> --cli-region=<region> format. See KooCLI Command Format for detailed examples and parameter naming rules.
| Document | Description |
|---|---|
| UCS Cluster Onboarding API Guide | hcloud UCS API reference |
| Output Format | Response format examples (verified) |
| IAM Permission Policies | Required permissions and policy JSON |
| Verification Method | Step-by-step verification |
| Common Pitfalls | Troubleshooting guides |
| Task: Cluster Registration | Registration and deregistration workflows |
| Task: Fleet Management | Fleet group workflows |
| Task: Access Management | Kubeconfig and access control workflows |
| CLI Installation Guide | hcloud CLI installation and configuration |
| Parameter Reference | Complete parameter tables for all operations |
| KooCLI Command Format | Command format standard and examples |
| Acceptance Criteria | Skill acceptance criteria and test checklist |
hcloud UCS ListRegisteredClusterVersions and verify cluster version is in the list before registration.--metadata.annotations.kubeconfighcloud UCS <Operation> format--clustergroupid and --duration are requiredspec.category uses self/onpremise (not CCE/AttachedCluster), spec.provider uses huaweicloud (not huawei_cloud), spec.type uses lowercase cce (not CCE), spec.city uses city codes like 110000 (not city names like Beijing)See Common Pitfalls & Solutions for detailed troubleshooting guides.